Referring to a variable in a roundabout way...

J. Landman Gay jacque at hyperactivesw.com
Mon Feb 13 00:45:05 EST 2006


Mark Swindell wrote:
> If a field contains the name of a variable gMyNumber, how can I place  
> something into that variable circuitously, referencing it not  directly, 
> but via its name residing in the field?
> 
> Example:
> Put 54 into (variable (word 1 of field 1)), where word 1 of field 1  
> contains the name of a global variable gMyNumber.

"Do" is your friend:

   put word 1 of fld 1 into myVar
   do "put 54 into" && myVar


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list