USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 10/5/09 06:03 AM
Sign-Up: 02/17/05
Posts: 4,577
var m1:Number = 0; var m2:Number = 1; function mCheck(a, b) { b = a; } mCheck(m1, m2); t = m1+'-'+m2; trace( t);
This function SHOULD trace 0-0. But it doesn't even change the variable of m2 to m1.
Does anybody know the reasoning behind this?
// LochieLand.com // Wacom for me? :O // The-SFC. // My DA & CN. // Click my sig. D':<
Posted at: 10/5/09 06:06 AM
Sign-Up: 03/14/05
Posts: 742
You're passing the value of the variables as arguments, not the memory addresses of the variables.
Although practicality beats purity. Errors should never pass silently. In the face of ambiguity, refuse the temptation to guess.
Posted at: 10/5/09 06:09 AM
Oh, I forgot they didn't actually pass the variable along with it.
My mistake, thanks mate. :)
All times are Eastern Standard Time (GMT -5) | Current Time: 01:48 PM
<< Back