Results 1 to 3 of 3
Thread: help with local variables
-
02-01-2012, 01:46 PM #1
- Join Date
- Jan 2009
- Location
- Belgium
- Posts
- 61
help with local variables
Hi,
I can use some help with local variables.
I do want to use a button to encrease variables.
like 0 + 1 = 1 and when push the button again 1 + 1 = 2 ect. Buth mine remains 1 what ever i do.
It should be simple a guess?
hope some one can help me out?
regards,
henri
-
02-01-2012, 10:24 PM #2
- Join Date
- Apr 2009
- Location
- Toronto
- Posts
- 125
Re: help with local variables
Hello Henri.
Assuming this is about SIOC:
When an event occurs to cause a section of script to be executed, a set of local variables is created for use during that iteration of the script. The local variables are lost when the section of script ends; i.e values assigned to them do not survive from one iteration to the next.
For your purposes use an ordinary variable; e.g.
Code:Var 0010, NAME Button, LINK IOCARD_SW, TYPE P { &Counter = &Counter + 1 . . etc. . } Var 0020, NAME Counter, VALUE 0
-
02-02-2012, 09:22 AM #3
- Join Date
- Jan 2009
- Location
- Belgium
- Posts
- 61
Re: help with local variables
Thanks Jim,
that did it.
regards,
henri
Hi...realize this has been a long time, but I'm heading down the path of building my own 777...
B777 Overhead Panel Design