intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF (EN)

int e l 4.12 DESCRIPTION OF STATEMENTS NOTE -- The Control Stack on Version 1.1 permits a graceful exit from incompleted control loops, given the following example: EXAMPLE: . . 50 GOSUB 1000 . . 1000 FOR I = 1 TO 10 1010 IF X = I THEN 1040 1020 PRINT I*X 1030 NEXT I 1040 RETURN Version 1.1 would permit the programmer to exit the subroutine even though the FOR-NEXT loop might not be allowed to complete if X did equal 1. Version 1.0 of MCS BASIC-52 would yield a C- STACK error if the FOR-NEXT loop was not allowed to complete before the RETURN statement was executed. - 42 -