Exit from an IF/ENDIF loop with a GOTO
In a time sensitive application I did try to gain time jumping out of a IF/ENDIF loop with a goto instruction. Here a snippet as example.
Code:
Main_Loop
If A > B then
A = B
Gosub one
Goto skip_00
ENDIF
If C > D then
C = D
Gosub two
Goto skip_00
ENDIF
.
.
.
.
.
.
.
If Z > W then
Z = W
Gosub ten
ENDIF
Skip_00:
Goto Main_Loop
The code seems working without any problems and does what is suppose to do.
The question is: Exiting any loops with a goto instruction can produce unpredictable results?
Thank you for any clarification on the subject.
Al.
All progress began with an idea
Bookmarks