Page images
PDF
EPUB
[merged small][merged small][merged small][merged small][merged small][merged small][merged small][ocr errors]

PROGRAM FILE 44: ELEMENTARY USE OF THE FOR-STATEMENT.
ANSI STANDARD 11.2, 11.4

SECTION 44.1: ELEMENTARY USE OF THE FOR-STATEMENT.

THIS SECTION TESTS A SIMPLE FOR-NEXT CONSTRUCTION WITH
A VARIETY OF VALUES FOR THE INITIAL-VALUE, LIMIT, AND
INCREMENT. TO PASS THE TEST, THE CONTROL-VARIABLE MUST
TAKE ON THE APPROPRIATE VALUES AND THE LOOP MUST BE EXECUTED
THE CORRECT NUMBER OF TIMES.

BEGIN TEST.

LOOP IS: FOR I1= 9.87789E-2 TO 9.87800E-2 STEP 3.00000E-7

[blocks in formation]
[blocks in formation]
[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][merged small][merged small][merged small][ocr errors][merged small][subsumed][subsumed][subsumed][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][merged small][merged small][merged small][merged small]

LOOP IS: FOR I1= 1.23400E+20 TO -4.32100E+20 STEP -8.70000E+19

[blocks in formation]
[blocks in formation]

10 PRINT "PROGRAM FILE 45: ALTERING THE CONTROL-VARIABLE WITHIN" 20 PRINT "

30 PRINT "

40 PRINT

A FOR-BLOCK."

ANSI STANDARD 11.2, 11.4"

50 PRINT "SECTION 45.1: ALTERING THE CONTROL-VARIABLE WITHIN" 60 PRINT "

70 PRINT

A FOR-BLOCK."

80 PRINT "THIS SECTION TESTS THAT THE VALUE OF THE CONTROL-VARIABLE" 90 PRINT "MAY BE ALTERED BY STATEMENTS WITHIN THE FOR-BLOCK, AS"

100 PRINT "WELL AS UNDER THE DIRECT CONTROL OF THE FOR-STATEMENT." 110 PRINT

[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]
[blocks in formation]

PROGRAM FILE 45: ALTERING THE CONTROL-VARIABLE WITHIN
A FOR-BLOCK.

ANSI STANDARD 11.2, 11.4

SECTION 45.1: ALTERING THE CONTROL-VARIABLE WITHIN

A FOR-BLOCK.

THIS SECTION TESTS THAT THE VALUE OF THE CONTROL-VARIABLE
MAY BE ALTERED BY STATEMENTS WITHIN THE FOR-BLOCK, AS
WELL AS UNDER THE DIRECT CONTROL OF THE FOR-STATEMENT.

BEGIN TEST.

« PreviousContinue »