Nested IF statements

In SX/B (IDE ver 3.2) is there a trick to nesting IF...THEN statements?
Doesn't seem to be a warning in the IDE help, but no examples of nested in help
I have searched forum for "nest if" and "nested if" but without results.
There is a nested example in the CLock/Timer sample.
This first one works fine:
if RB.3 = 1 then
· pause 1
endif
This second one fails, throwing a 26 error at the second EndIF (last line below)
if RB.3 = 1 then
pause 1
· ·if RB.4 = 1 then
······ pause 1
·· endif
endif
·
Error 26 from help:
Doesn't seem to be a warning in the IDE help, but no examples of nested in help
I have searched forum for "nest if" and "nested if" but without results.
There is a nested example in the CLock/Timer sample.
This first one works fine:
if RB.3 = 1 then
· pause 1
endif
This second one fails, throwing a 26 error at the second EndIF (last line below)
if RB.3 = 1 then
pause 1
· ·if RB.4 = 1 then
······ pause 1
·· endif
endif
·
Error 26 from help:
Comments
I am not aware of a 'trick' to nesting If...Then statements. I have nested many myself.
I copied the code from your second example into the main program body of the example template from the help file. It compiled just fine for me. I am using SX-Key 3.2 and not yet the latest version that was made available within the last few days.
- Sparks
Older versions of the compiler had a problem with lowercase commands (I think IF..THEN..ELSE..ENDIF were ones).
Try either the latest compiler (1.51.03) or make them uppercase.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Don't mistake experience for intelligence. And vis-vera.
·
Changing to upper case did the trick.
I will check on 1.51.03 compiler tomorrow.
BTW, is there a wish list kept somewhere for improvments to the user IDE interface?