You mean something like this?
If B1 =25 Then
B0 = 5
ENDIF
That't the desired end result.
However, prior to PicBasic Pro compiler (which I don't yet have) statements, the IF statement was not this powerful. You are limited to a simple GOTO.
i.e.
B0 = 1
IF B0 = 1 THEN STEP_1
IF B0 = 5 THEN STEP_3
STEP_1:
'do something fun here
STEP_3
'do something crazy here
So, I seem to remember getting creative with the AND statement where I could modify variables without the IF statement.
i.e.
B0 = 5 and B1 = 25
Thanks
dw
' * * * IF B0 = 25 THEN B1 = 5 * * *
IF B0 = 25 THEN SET_B1
IF B0 <> 25 THEN NOTHING
SET_B1:
B1 = 25
NOTHING:
' * * * Continue * * *
Bookmarks