Page images
PDF
EPUB
[blocks in formation]

SECTION 46.2: FOR-LOOPS WITH SAME CONTROL-VARIABLE

NESTED DYNAMICALLY WITH GOSUB.

THIS SECTION TESTS THAT A GOSUB ROUTINE CAN BE EXECUTED FROM WITHIN A FOR-BLOCK AND THAT THE SUBROUTINE MAY ITSELF CONTAIN A FOR-BLOCK. IF THE TWO FOR-BLOCKS USE THE SAME CONTROL-VARIABLE, THE ORIGINAL VALUE IS LOST.

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][subsumed][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]

SECTION 46.3 CONTROL-STATEMENT JUMPS OUT OF FOR-BLOCK.

THIS SECTION TESTS THAT YOU CAN JUMP OUT OF A FOR-BLOCK AND THAT THE CONTROL-VARIABLE RETAINS ITS VALUE WHEN THIS HAPPENS.

BEGIN TEST.

LOOP IS: FOR I1= 33 TO 66 STEP 4

[blocks in formation]

10 PRINT "PROGRAM FILE 47: INCREMENT IN THE STEP CLAUSE OF THE" 20 PRINT"❗

FOR-STATEMENT DEFAULTS TO A VALUE OF ONE."

30 PRINT " ANSI STANDARD 11.2, 11.4"

40 PRINT

50 PRINT "SECTION 47.1: INCREMENT IN THE STEP CLAUSE OF THE"

60 PRINT "

FOR-STATEMENT DEFAULTS TO A VALUE OF ONE."

70 PRINT

**

[blocks in formation]
[merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small]

PROGRAM FILE 47: INCREMENT IN THE STEP CLAUSE OF THE FOR-STATEMENT DEFAULTS TO A VALUE OF ONE.

ANSI STANDARD 11.2, 11.4

SECTION 47.1: INCREMENT IN THE STEP CLAUSE OF THE FOR-STATEMENT DEFAULTS TO A VALUE OF ONE.

[merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small][merged small]
[blocks in formation]

10 PRINT "PROGRAM FILE 48: LIMIT AND INCREMENT IN THE FOR-STATEMENT" 20 PRINT " ARE EVALUATED ONCE UPON ENTERING THE LOOP."

30 PRINT " ANSI STANDARD 11.2, 11.4"

40 PRINT

50 PRINT "SECTION 48.1: LIMIT AND INCREMENT IN THE FOR-STATEMENT" 60 PRINT " ARE EVALUATED ONCE UPON ENTERING THE LOOP."

[blocks in formation]
« PreviousContinue »