initialize an static, local, script-wide variable to empty

erik hansen erikhans08 at yahoo.com
Fri Apr 11 18:24:01 EDT 2003


> Alternatively, you may have want to use the
> main handler in your script 
> to initialize the variable but then set it (in
> any of the script's 
> handlers) and have the new value available to
> all other handlers until 
> the next time the main handler is called. In
> this case, just put the 
> "put empty into sHolder" line in your main
> handler.
> 
> As far as I know, you can't initialize
> variables outside a handler.

the TD says:

local A=1,B=2,C=3 
# creates variables with initial values
you are right, this does not work when the local
command is outside a handler. nor are the values
held when all of the handlers finish.
sHolder = empty, the reset i wanted.
just determined by the good old empirical method.

is it close to say that the script/static global
performs as a parameter-passer while saving you
the bother of cluttering up your script?

thanks Richard & Sarah

=====
erik at erikhansen.org    http://www.erikhansen.org

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com



More information about the use-livecode mailing list