The simple way to avoid that in the future is what many have suggested for the 
eons we have been posting on this list: Name your variables in such a way that 
they *cannot* conflict. For instance, globals should start with a g as in 
gFormApp. Local variables might start with an l (some say p but others say that 
should be for passed parameters). It’s really up to you. the important thing is 
that simply by looking at a variable, you can know it’s “scope” (pseudo scope I 
suppose since LC does not really scope variables). 

Bob S


> On Feb 16, 2015, at 13:19 , Dr. Hawkins <doch...@gmail.com> wrote:
> 
> On Mon, Feb 16, 2015 at 11:07 AM, J. Landman Gay <jac...@hyperactivesw.com>
> wrote:
> 
>> Is the global declared at the top of the script? Are you trying to use a
>> local variable in a handler with the same name as the global?
>> 
>> 
> no & nope.
> 
> There is a single local variable declared outside of any scripts (to flag
> initialization when returning to the mainstack).  No globals declared
> outside of handlers.
> 
> These are declared global inside handlers, so declaring them local should
> cause an error with strict compilation.
> 
> When I step through, the array gets elements, and they disappear when
> returning to the calling program.
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to