Problem with declaring local variables

Stgoldberg at aol.com Stgoldberg at aol.com
Wed Jun 7 09:16:07 EDT 2006


Until now I've had the impression that global variables need to be declared, 
whereas local variables do not.   However, I've just noticed that (using Rev 
2.7, Mac OS X)   if I don't declare the local variable before the scripting, I 
get an error message "Can't create a variable with that name 
(explicitvariables)".   This occurs whether or not explicitvariables is true or false.   
However, the Rev directions indicate that it should not be necessary to declare 
local variables if exlpicitvariables is false.  Is this a bug?   I've also noticed 
that whereas a previously developed stack may run OK with local variables not 
declared, that as soon as I make any slight change to the script the error 
message appears.   I recognize that it's a good idea to declare local variables 
to avoid inadvertent typos in the local variables, but it would seem this need 
to be addressed correctly in the directions.
Steve Goldberg



More information about the use-livecode mailing list