View Single Post
Old 05-07-2009, 03:12 AM   #18 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Leave it to WH to take my skit to another level! LOL...good stuff...

Ok. so basically..the Borg...resistance is futile...






I completely understand now thanks to WH and VI!

I was borderline understanding it, but the "skits" made it go over the top. I completely get it....this is what I was waiting for, something to just click....

Just to explain, I had a completely different viewpoint of what "pass-by-reference" worked...

Say you have $var2 =& $var1;


I thought that $var2 didn't OWN anything. That $var1 provided a "looking" glass to what it's value is, so say it's value is: Blue.

$var2 would just say, "I am blue too, THROUGH $var1"...


But in fact, the pass-by-ref is actually providing the location of the value in RAM (thanks VI) in which $var2 now can dip it's fingers in it and also OWN the value.

This is different from pass-by-value in which $var2 would get a COPY of the value in a different location in RAM. So changing it's value would not affect $var1.

But now that they are in-sync due to pass-by-ref, they are all one collective Borg's!!!!


Did I get it right??
allworknoplay is offline  
Reply With Quote