03-16-2023, 06:25 PM
The SICK64 example is trying to jump out of both "FOR... NEXT" loops. "EXIT FOR" would just jump out of the innermost one, and after that it would require an IF statement to check a flag in the least so it could jump out of the outer loop. While inside the innermost loop must have a flag which is usually set to zero, and set to -1 or 1 only for the purpose of breaking out of "everything". That's so that the flag could be checked later.
Otherwise use "GOTO". (shrugs)
Freebasic could do "EXIT FOR, DO, FOR, DO" which is more typing and confusing, but some people like many levels of nesting in their parsers and other such routines.
Otherwise use "GOTO". (shrugs)
Freebasic could do "EXIT FOR, DO, FOR, DO" which is more typing and confusing, but some people like many levels of nesting in their parsers and other such routines.