Global variables lost in space

Richard Gaskin ambassador at fourthworld.com
Wed May 18 12:06:32 EDT 2005


Mark Talluto wrote:
> On May 17, 2005, at 5:23 PM, Dar Scott wrote:
>
>> On May 17, 2005, at 5:49 PM, Mark Talluto wrote:
>>> I just got bitten by the same thing and came to realize that if  you 
>>> create a new global variable and put a number into it, it will  not 
>>> now up.
>>
>> This works for me:
>>
>> on mouseUp
>>   global a
>>   put 0+5 into a
>>   put "[" & a & "]"
>> end mouseUp
>>
>> I even changed the global to some weird name and used random().
>> Rev 2.5.1 on OS X 10.3.9 (MDD).
>
> Now open up your message box and look for the value of the global  
> variable in the global variable list.  It will not show up.  It is  true 
> that the value is usable from within a script though.

The word "a" is a native Transcript token, so that may affect why it 
doesn't appear when you query "the globals".  It does seem to behave 
well in all other respects, however.

-- 
  Richard Gaskin
  Fourth World Media Corporation
  Developer of WebMerge: Publish any database on any Web site
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


More information about the use-livecode mailing list