Shop OBEX P1 Docs P2 Docs Learn Events
NESTING in SX/B — Parallax Forums

NESTING in SX/B

RobotWorkshopRobotWorkshop Posts: 2,307
edited 2008-02-26 19:28 in General Discussion
I've read that you can nest gosubs several levels deep. What about IF THEN ENDIF, and IF THEN ELSE ENDIF. Are there any things to watch out for in regards to nesting those? If not, will the EXIT just exit the IF THEN ENDIF it it in or out of all the nested ones?

Comments

  • BeanBean Posts: 8,129
    edited 2008-02-26 19:28
    I think IF...THEN...ELSE...ENDIF nesting can be something like 128 levels. It is dependent on the compiler not the SX.
    EXIT will only exit from the IF...THEN...ENDIF structure that it is in. It will NOT exit out of all the nested ones.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
Sign In or Register to comment.