
07-03-2002, 12:11 PM
|
is watching you
|
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
|
|
well, since there is only two possible flags, on or off, i just use variables 0 and 1
take the current status of the light, lets say off (off=0) and then just take the absolute value of the status -1, so
0-1 = -1
|-1| = 1
turns from off (0), to on (1)
same way around
1-1 = 0
|0| = 0
turns from on (1), to off (0) |
__________________
[signature]insert here[/signature]
|
|
|