in reply to Dereferencing

$RESPONSE is a reference and it is basically a memory address. Now it's great to pass that around instead of copying the actual value which is one of the reasons people use it. Now, you can't just say something like $RESPONSE = 0 because that would assign the memory address of $RESPONSE to 0... not the actual value. So in order to dereference it (or in other words to use the actual value) you put a $ in the front. This basically says, I don't want the address, instead I want the value at that address. In your case you are assigning the value of 0 to it instead of getting a value. It works both ways.

Hope that helped. The docs are pretty good too, I just thought I would give a brief description.

Replies are listed 'Best First'.
Re: Re: Dereferencing
by flyingmoose (Priest) on Mar 30, 2004 at 19:32 UTC
    $RESPONSE is a reference and it is basically a memory address

    In interest of full-disclosure, it is not really a memory address, but basically like a memory address. I'm saying this for new-user benefit since MCS probably knows this. A reference is an entry in a symbol-table, if you like...not quite like C/C++ pointers. In Java, well, objects just act as references, so the line is blurred in a rather confusing way if that's where you are coming from.