Globals Question

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Nov 2 09:05:56 EST 2005


Hi Dave,

By definition, the value of any global is available everywhere in any  
open stack/script/handler/function where this global is declared.
All current global variables names are returned by the globalNames  
property.
Have a look at the globals pane of the message box.
For instance, try this in any stack:

on mouseUp
   put any item of the globalNames into tGlobal
   do "global" && tGlobal -- global declaration
   do "put" && tGlobal && "into tValue" -- global value
   put tGlobal & colon & cr & tValue -- result into the msg
end mouseUp


Le 2 nov. 05 à 14:13, David Burgun a écrit :

> I'm a bit confused over the Scope of Global Symbols. If I have a  
> stack with:
>
> global gGlobal
>
> defined outside of all handlers
>
> and the same in a card or control script BUT in the same Stack, is  
> the same "gGlobal" used in both places?


Best Regards from Paris,

Eric Chatonet.
----------------------------------------------------------------
So Smart Software

For institutions, companies and associations
Built-to-order applications: management, multimedia, internet, etc.
Windows, Mac OS and Linux... With the French touch

Free plugins and tutorials on my website
----------------------------------------------------------------
Web site        http://www.sosmartsoftware.com/
Email        eric.chatonet at sosmartsoftware.com/
Phone        33 (0)1 43 31 77 62
Mobile        33 (0)6 20 74 50 86
----------------------------------------------------------------




More information about the use-livecode mailing list