in reply to HoH Weirdness
Now, as to how using a string as a reference works ... I'm a little fuzzier on that. But, I do like using it, in very controlled doses. :)
Now, as to the second question ... I did a little further playing around and found that so long as the assignment of Apple never happened before the assignment of Red, for that given hash, neither hash correctly printed "Red Apple".
<speculation>
I'm going to guess that the moment the interpreter sees that the string 'Apple' can be made into a reference, it marks 'Apple' as a valid reference for everyone. Why it affects the hash seemingly defined before it? Because, the interpreter, in its first pass, will find all the possible references and remember those. Then, in the second pass, it will use those references it knows about.
</speculation>
Nifty theoretical problem!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: HoH Weirdness
by merlyn (Sage) on Jun 08, 2001 at 22:48 UTC |