Globals from the message box

Mike Bonner bonnmike at
Mon Nov 28 15:57:25 EST 2011

Seems like it should work but..

To get around this weirdness, define the globals once in the message box by
themselves at which point they will "stick" and you can use them to your
hearts content.

global gLogonSite,gSiteID -- once
at which point it seems that any and all future references to them from the
message box seem to work fine.

On Mon, Nov 28, 2011 at 1:07 PM, Bob Sneidar <bobs at> wrote:

> Hi all.
> I seem to remember this working once, but it does not work now. In the
> message box I put:
> global gLogonSite,gSiteID;put gLogonSite & "," & gSiteID
> I get true. I should be getting something like 0,00002. Are semicolons
> legal in the message box or no? I know I can use  the multiline section of
> the message box but often it is more convenient to use the semicolons. For
> instance, this works:
> put "test1" into myArray[1];put "test2" into myarray[2];put myArray[1] &
> "," & myarray[2]
> I get "test1,test2" but if I make the array a global and declare it before
> my put statement, I get true when I try to put any of the elements in the
> message.
> But apparently you put globals into the message like this. Globals in the
> single line message box always seem to return true. What is perhaps some
> indicator of where things go wrong is the fact that I can modify the global
> variable in a single line message like so:
> global myArray;put "test3" into myArray[1];put "test4" into myarray[2]
> Then I can display the elements of the array in the multi-line message box
> like this:
> global myArray
> put myArray[1] & "," & myArray[2]
> That works famously! It's only in the single line message box that
> semicolon delimited put statements using globals always resolves to true.
> Sounds buggy to me! Again, not a big bug, but I *AM* the Bugmeister!
> Bob
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the Use-livecode mailing list