Strict Compile Mode
    J. Landman Gay 
    jacque at hyperactivesw.com
       
    Tue Oct  9 23:09:11 EDT 2012
    
    
  
On 10/9/12 9:10 PM, Dr. Hawkins wrote:
> I would *really* like a semi-global scope that applies only to other
> routines in the same script, and not to other scripts . . .
That's what script local variables are. Declare them at the top of the 
script (or before any other handler uses them) and all handlers in that 
script (and that script only) have access to it:
local sCounter
on openCard
   put 0 into sCounter
end openCard
on whatever
   add 1 to sCounter
end whatever
on somethingElse
   subtract 5 from sCounter
end somethingElse
As long as all these handlers are in the same script, they can all 
access sCounter. Other scripts don't know about it. See "local" in the 
dictionary.
-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com
    
    
More information about the use-livecode
mailing list