10 PRINT "PROGRAM FILE 62: GENERAL SYNTACTIC AND SEMANTIC"
20 PRINT "        PROPERTIES OF ARRAY CONTROL STATEMENTS:"
30 PRINT "        OPTION AND DIM."
40 PRINT "    ANSI STANDARD 15.2, 15.4"
50 PRINT
60 PRINT "SECTION 62.1: GENERAL SYNTACTIC AND SEMANTIC"
70 PRINT "        PROPERTIES OF ARRAY CONTROL STATEMENTS:"
80 PRINT "        OPTION AND DIM."
90 PRINT
100 PRINT "THIS SECTION ASSURES THAT OPTION-STATEMENTS MAY PRECEDE"
110 PRINT "DIM-STATEMENTS, THAT REFERENCES TO IMPLICITLY-DIMENSIONED"
120 PRINT "ARRAYS MAY ALSO PRECEDE DIM-STATEMENTS, AND THAT FLOW"
130 PRINT "OF CONTROL MAY PASS THROUGH OPTION AND DIM STATEMENTS."
140 PRINT
150 PRINT "                 BEGIN TEST"
160 LET F=0
170 LET T=1
180 OPTION BASE 1
190 REM CAN FALL THROUGH OR JUMP TO OPTION WITH NO EFFECT
200 IF T<>1 THEN 230
210 LET T=2
220 GOTO 180
230 LET A(1)=1
240 REM CAN REFERENCE ARRAY BEFORE ANY DIM-STATEMENT
250 FOR I=2 TO 10
260 LET J=I-1
270 LET A(I)=A(J)+A(J)
280 NEXT I
290 IF A(10)=512 THEN 320
300 LET M$="IMPLICIT ARRAY"
310 GOSUB 1000
320 LET T=1
330 DIM D(3),C(2,4),B(12)
340 REM CAN DIMENSION SEVERAL ARRAYS IN NON-ALPHA ORDER AND
350 REM OF DIFFERENT DIMENSIONALITY
360 REM CAN FALL THROUGH OR JUMP TO DIM
370 IF T<>1 THEN 400
380 LET T=2
390 GOTO 330
400 LET B(12)=A(10)
410 FOR I=11 TO 1 STEP -1
420 LET J=I+1
430 LET B(I)=B(J)
440 NEXT I
450 IF B(1)=512 THEN 480
460 LET M$="EXPLICIT ARRAY"
470 GOSUB 1000
480 GOTO 510
490 DIM E(14)
500 REM DIM SETS ARRAY SIZE EVEN IF JUMPED OVER
510 LET A(10)=666
520 LET B(12)=A(10)
530 LET C(2,4)=B(12)
540 LET D(3)=C(2,4)
550 LET E(14)=D(3)
560 IF E(14)=666 THEN 590
570 LET M$="SKIPPED-OVER DIM"
580 GOSUB 1000
590 PRINT
600 IF F=0 THEN 630
610 PRINT " ***  TEST FAILED IN ";F;" CASE(S)  *** "
620 GOTO 640
630 PRINT " ***  TEST PASSED  *** "
640 PRINT
650 PRINT "                  END TEST"
660 PRINT
670 PRINT "END PROGRAM 62"
680 STOP
1000 PRINT "FAILURE BECAUSE OF: ";M$
1010 LET F=F+1
1020 RETURN
1030 END
