Keep BASIC fixtures within the input line limit
Reflow the approved reference cases, shorten local fixture comments, and split the executable docs line so the 80-byte input buffer can read every source line. Co-authored-by: andrew <andrew@aklabs.net>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
10 REM A leading zero is padding, not a radix. The reference selects base 8 for
|
||||
20 REM any lexeme starting with 0, so 010 printed 8 and 08 was a parse error --
|
||||
30 REM TODO.md section 6 item 10, fixed. Commodore BASIC has no octal literals.
|
||||
40 REM 0x is the one prefix that changes the base, and it now reaches the scanner
|
||||
10 REM A leading zero is padding, not a radix. The reference selects base 8;
|
||||
20 REM 010 printed 8 and 08 was a parse error -- TODO.md section 6 item 10.
|
||||
30 REM Commodore BASIC has no octal literals.
|
||||
40 REM 0x is the one prefix that changes the base and reaches the scanner
|
||||
50 REM whole: that was section 6 item 15.
|
||||
60 PRINT 010
|
||||
70 PRINT 08
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
10 REM A truth value carries its payload in boolvalue, not floatval. The three
|
||||
20 REM numeric operators were `if ( INTEGER ) ... else <treat as float>`, and
|
||||
30 REM that else was a catch-all rather than a float branch -- so a truth value
|
||||
30 REM that else was a catch-all, not a float branch -- so a truth value
|
||||
40 REM on the LEFT computed 0 - 1 into a field nothing reads, kept its BOOLEAN
|
||||
50 REM type, and printed `true` instead of -2. Silent, and wrong twice over.
|
||||
60 A# = 1
|
||||
70 PRINT (A# == 1)
|
||||
80 REM On the RIGHT it stays legal and stays -1, which is the same property that
|
||||
90 REM lets AND and OR double as logical operators. Refusing it here would have
|
||||
80 REM On the RIGHT it stays legal and stays -1, the same property that
|
||||
90 REM lets AND and OR double as logical operators. Refusing it would have
|
||||
100 REM broken every condition in the language.
|
||||
110 PRINT 5 - (A# == 1)
|
||||
120 PRINT 5 * (A# == 1)
|
||||
|
||||
Reference in New Issue
Block a user