5075 IF F$="F*" THEN 5200 5080 GOTO 5210 5200 LET N$="FAILED" 5205 LET R$="FAILED" 5210 REM RESULTS CHECKED 5510 PRINT TAB(38); A$; TAB (42); B$; TAB (46); C$; TAB(50); D$; 5520 PRINT 5530 RETURN 9999 END TAB(54); E$; TAB(58); F$; TAB(62); N$ PROGRAM FILE 19: THE IF-THEN STATEMENT WITH NUMERIC OPERANDS SECTION 19.1: THE IF-THEN STATEMENT WITH NUMERIC OPERANDS. THIS SECTION TESTS THE COMPARISON OF NUMERIC VARIABLES AND 'T' OR 'F' IS PRINTED TO SHOW THE OUTCOME OF THE COMPARISON. FOR INCORRECT COMPARES, AN '*' IS PRINTED NEXT TO THE ERRONEOUS RESULT. IF-THEN STATEMENT WITH A STRING AND" 10 PRINT "PROGRAM FILE 20: ERROR 50 PRINT "SECTION 20.1: ERROR IF-THEN STATEMENT WITH A STRING AND" 60 PRINT " 70 PRINT NUMERIC OPERAND." 80 PRINT "THIS PROGRAM ATTEMPTS TO COMPARE A STRING VARIABLE WITH A" 90 PRINT "NUMERIC VARIABLE IN AN IF-THEN STATEMENT." 100 PRINT 110 PRINT "THIS IS A TEST FOR A NON-STANDARD FEATURE OF MINIMAL BASIC." 120 PRINT "TO PASS THIS TEST, THE PROCESSOR MUST EITHER:" 130 PRINT 140 PRINT " 1) ACCEPT THE PROGRAM AND BE ACCOMPANIED BY DOCUMENTATION" 150 PRINT " ACCURATELY DESCRIBING THE FEATURE'S INTERPRETATION" BY THE PROCESSOR, OR" 160 PRINT " 170 PRINT 180 PRINT " 2) REJECT THE PROGRAM WITH AN APPROPRIATE ERROR MESSAGE" 190 PRINT 200 PRINT "SEE THE NBS MINIMAL BASIC TEST PROGRAMS USER'S MANUAL" 210 PRINT "FOR DETAILED CRITERIA." 10 PRINT "PROGRAM FILE 21: ERROR - TRANSFER TO NON-EXISTING LINE" 15 PRINT NUMBER USING THE IF-THEN-STATEMENT." 20 PRINT ANSI STANDARD 10.4" 30 PRINT 40 PRINT "SECTION 21.1: ERROR 50 PRINT " TRANSFER TO NON-EXISTING LINE NUMBER" USING THE IF-THEN-STATEMENT." 60 PRINT 70 PRINT "THIS IS A TEST FOR A NON-STANDARD FEATURE OF MINIMAL BASIC." 80 PRINT "TO PASS THIS TEST, THE PROCESSOR MUST EITHER:" 90 PRINT 100 PRINT " 110 PRINT " 120 PRINT " 130 PRINT 1) ACCEPT THE PROGRAM AND BE ACCOMPANIED BY DOCUMENTATION" 140 PRINT " 2) REJECT THE PROGRAM WITH AN APPROPRIATE ERROR MESSAGE" 150 PRINT 160 PRINT "SEE THE NBS MINIMAL BASIC TEST PROGRAMS USER'S MANUAL" 170 PRINT "FOR DETAILED CRITERIA." 180 PRINT 190 PRINT " 200 PRINT 230 LET A$="LINE 300." 240 LET A=5 250 IF A=5 THEN 295 BEGIN TEST." 260 PRINT "IF THIS MESSAGE APPEARS THE IF-THEN-STATEMENT WAS NOT" 270 PRINT "EXECUTED." 10 PRINT "PROGRAM FILE 22: NUMERIC AND STRING VARIABLE NAMES" 20 PRINT " WITH THE SAME INITIAL LETTER." 30 PRINT " ANSI STANDARD 6.2, 6.4" 40 PRINT 50 PRINT "SECTION 22.1: NUMERIC AND STRING VARIABLE NAMES WITH THE" 60 PRINT " 70 PRINT SAME INITIAL LETTER." 80 PRINT "THE STANDARD ESTABLISHES A NAME SPACE OF AT LEAST 286 NUMERIC" 90 PRINT "DATA NAMES (A Z, AO ZO, A1 Z1, 100 PRINT "DISTINCT STRING DATA NAMES (A$ 102 PRINT 104 PRINT "THIS PROGRAM TESTS THAT DISTINCT VALUES ARE PRESERVED" 106 PRINT "IN VARIABLES WITH SIMILAR, BUT NOT IDENTICAL, NAMES." 110 PRINT 120 PRINT " 130 PRINT BEGIN TEST." 140 LET A=10 155 LET AO=A 160 LET A0=100 170 LET A9=109 180 LET B1=123E22 190 LET BO=-123E-22 200 LET B$="18 CHARACTERS LONG" 210 LET B=33 220 IF A<>10 THEN 320 230 IF A$<>"ABC" THEN 320 240 IF A9<> 109 THEN 320 250 IF AO<>100 THEN 320 260 IF B<>33 THEN 320 270 IF B$<>"18 CHARACTERS LONG" THEN 320 280 IF B1<>123E22 THEN 320 290 IF BO<>-123E-22 THEN 320 PROGRAM FILE 22: NUMERIC AND STRING VARIABLE NAMES WITH THE SAME INITIAL LETTER. ANSI STANDARD 6.2, 6.4 SECTION 22.1: NUMERIC AND STRING VARIABLE NAMES WITH THE THIS PROGRAM TESTS THAT DISTINCT VALUES ARE PRESERVED ** **** 10 PRINT "PROGRAM FILE 23: INITIALIZATION OF STRING AND NUMERIC" 20 PRINT " VARIABLES." 30 PRINT " ANSI STANDARD 6.6" 40 PRINT 50 PRINT "SECTION 23.1: INITIALIZATION OF STRING AND NUMERIC" 60 PRINT " 70 PRINT VARIABLES." 80 PRINT "THIS PROGRAM TESTS HOW THE IMPLEMENTATION TREATS" 140 PRINT 150 PRINT " 160 PRINT BEGIN TEST." 170 PRINT "NEITHER A$ OR Y HAS BEEN ASSIGNED A VALUE." 180 PRINT 190 PRINT "THE IMPLEMENTATION-DEFINED INITIAL VALUE (SURROUNDED" 200 PRINT " BY APOSTROPHES) FOR A$=";"'"; A$;"'" 210 PRINT "THE IMPLEMENTATION-DEFINED INITIAL VALUE FOR Y = ";Y 220 PRINT 230 PRINT "IF THE DOCUMENTATION FOR THIS IMPLEMENTATION CORRECTLY" 240 PRINT " DESCRIBES THE RESULTS ABOVE, THEN" SECTION 23.1: INITIALIZATION OF STRING AND NUMERIC THIS PROGRAM TESTS HOW THE IMPLEMENTATION TREATS BEGIN TEST. NEITHER A$ OR Y HAS BEEN ASSIGNED A VALUE. |