cross-stack globals, also, file inclusion

Stephen Quinn Barncard stephenREVOLUTION at barncard.com
Wed Oct 22 19:36:24 EDT 2003


Please excuse the obvious, but can't a custom property, say in the 
main stack, act as a global constant?  Set it in the IDE and it will 
persist through standalone creation forever...

sqb

>On Wednesday, October 22, 2003, at 09:23 AM, Alex Rice wrote:
>
>>Like global, it would be usable in all scripts.
>>Unlike global, it would not have to be declared in each handler using it.
>>Like constant, it would be directly usable in any handler that wants it.
>
>Would each script that uses it, but not define it, have a line in 
>the script like this?
>
>    global constant ageOfUniverse
>
>And then the script for the mainstack have something like this?
>
>    global constant ageOfUniverse = "1"
>
>
>I wonder if this would work as well:
>
>global ageOfUnivere
>on startup
>    put 1+0 into ageOfUniverse
>    ...
>end startup
>
>BTW, the Transcript Dictionary entry for 'global' is a little 
>confusing and you have to scroll down to get the full picture.  It 
>says it "must appear in each handler" that uses it and then later 
>says you "can also place a global command in a script, but outside 
>any handlers."
>
>Dar Scott


More information about the Use-livecode mailing list