Shop OBEX P1 Docs P2 Docs Learn Events
Use of Exit — Parallax Forums

Use of Exit

DonDon Posts: 34
edited 2004-08-15 01:08 in BASIC Stamp
Say that you have·an Exit statement appears within a mixed series of nested For and Do loops.· I assume that only the innermost loop that·contains the Exit gets terminated.· Is this correct?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don Kinzer

·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-14 22:27
    Yes, this is correct.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2004-08-15 01:08
    Yes, the EXIT is internally compiled as a GOTO the instruction after the next LOOP. I have some exploration of this at owlogic.com/BS2pbasic25.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.