Globals Question

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Nov 2 09:30:15 EST 2005


Hi again,

Le 2 nov. 05 à 15:20, David Burgun a écrit :

> This is what I don't understand. If I define gGlobal in the stack
> script and also define it in the card script, are there one or two
> gGlobals's created?

Only one global with the same name :-)
Try this:

In any stack:

on mouseUp
   global gMyTest
   put "Dave" into gMyTest
end mouseUp

In another stack:

on mouseUp
   global gMyTest
   put gMyTest -- Dave into the msg ;-)
end mouseUp

> If I don't define gGlobal in the card script, then I get an error
> since I have variable checking turned on.

Normal ;-)
If a global is not declared, Rev assumes it is a local variable that  
can have another value...

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