Forgotten Variables - problem is fixed

2006-12-06 Thread baleareninsel
Hi Mark, Victoras, Eric

Thank you for your answers/infos. The problem seems to be fixed 

It´s always a problem reading and UNDERSTANDING a handbook even if you don´t 
use your own language :-)) But it´s clear now. 

have a nice day

Horst

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Forgotten variables

2006-12-06 Thread Eric Chatonet

Hi Horst,

To declare globals (or local) variables you may use:

global gVar1
global gVar2
global gVar3
global gVar4

local tVar1
local tVar1
local tVar1
local tVar1

Declaring a variable per line.
Or:

global gVar1, gVar2, gVar3, gVar4

local tVar1, tVar2, tVar3, tVar4

Using a single line.

Please note:
When declaring multiple variables in a row, variables names appear  
always as a comma delimited list (space is up to you: it's not  
necessary)
Variables names are prefixed to immediately notice in the code their  
status.


Where to declare variables?

1. At the top of an object's script: locals will be script local  
variables, i.e. accessible by all handlers in the script and global  
will not need to be declared in any handler that use them in this  
script.
2. At the beginning of any handler: locals will be only accessible in  
this handler and globals will have to be declared in each handler  
that uses them.


Hope this helps.

Best Regards from Paris,
Eric Chatonet

Le 6 déc. 06 à 12:56, [EMAIL PROTECTED] a écrit :


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


 
--

http://www.sosmartsoftware.com/[EMAIL PROTECTED]/


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Forgotten variables

2006-12-06 Thread Viktoras Didziulis
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: [EMAIL PROTECTED] 
Date: 12/06/06 13:54:53 
To: use-revolution@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@lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences: 
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Forgotten variables

2006-12-06 Thread Mark Schonewille

Hi Horst,

If you use the global statement inside a handler, you have to repeat  
that in all handlers that use the declared variables. If you use  
global outside a handler, you still have to repeat it at the top of  
all scripts that use the declared variables. So, you could write


global var1,var2,var3,var4

at the top of the card script to use these variables in all handlers  
of the card script.


I've noticed that you use spaces instead of commas to separate  
variables. Does that work?


Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software.  
Download at http://www.salery.biz


Op 6-dec-2006, om 12:56 heeft [EMAIL PROTECTED] het volgende  
geschreven:



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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Forgotten variables

2006-12-06 Thread baleareninsel
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution