You'll have to try this to see if it really works, but if you're going to construct global variables like that, you'll need to use the "do" command.

do "global gStart" & counter & "EndPart"

ah heck, I'll try it out for you....

on testing this, that  --movieScript
  do "global gFoo" & this & "Bar"

do "gFoo" & this & "Bar = " & that

  showglobals
end

testing(1,2)
results in:

-- Global Variables --
version = "8.5.1"


nope. doesn't work.


But, you can address the globals directly, and not having to declare "global gThisOne" by using the (the globals) object.

on testing this, that  --movieScript
  do "global gFoo" & this & "Bar"

do "gFoo" & this & "Bar = " & that

showglobals

(the globals).SetAProp(symbol("gFoo" & this & "Bar"), that)

  showGlobals
end

now
testing(1,2)
results in:

-- Global Variables --
version = "8.5.1"

-- Global Variables --
gFoo1Bar = 2
version = "8.5.1"

so you see it does work the second time.

roymeo


---------- roymeo(AT)brokenoffcarantenna.com ---------- i used to love you back when you wrote poetry


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to