Forgotten variables
Viktoras Didziulis
viktoras at ekoinf.net
Wed Dec 6 07:11:00 EST 2006
when declaring global variable, it should be declared as global in every
handler or function it is used like this:
on doThis
global var1
put 1 into var1
end doThis
on doThat
global var1 #!!!!
answer var1
end doThat
otherwise handlers can not see var1 even if it is global in one of them,
because the other assumes by default that it is local...
Viktoras
-------Original Message-------
From: baleareninsel at gmx.net
Date: 12/06/06 13:54:53
To: use-revolution at lists.runrev.com
Subject: Forgotten variables
Hello everybody,
Using RunRev 2.7.4,
I declare
on preopenstack
...
...
global var1 var2 var3 var4
...
...
put "my variable" into var1
end preopenstack
Now, in another card, I would like to use var1, but var1 is empty. Does
someone know why? where is my fold?
best regards and Thanks in advance
Horst
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list