At 4:57 AM -0800 3/20/2002, Ben Rubinstein wrote:
>Is there any way to assign by reference?
Calling parameters by reference:
If the name of a parameter variable is preceded with the @ character, that
parameter's value is a variable name, rather than the value in the
variable. Changing the parameter variable in the called handler changes the
value of the variable in the calling handler.
The following handler takes a parameter and simply adds 1 to it:
on setVariable @incomingVar
add 1 to incomingVar
end setVariable
This handler calls the "setVariable" handler above:
on mouseUp
put 8 into someVariable
setVariable someVariable
answer "someVariable is now:" && someVariable
end mouseUp
Executing this mouseUp handler displays a dialog box that says
"someVariable is now: 9". This is because, since someVariable was passed by
reference to the setVariable handler, its value was changed when
setVariable added 1 to the corresponding parameter variable.
--
Jeanne A. E. DeVoto ~ [EMAIL PROTECTED]
http://www.runrev.com/
Runtime Revolution Limited - Power to the Developer!
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution