Logo
Explore Help
Sign In
andrew/akbasic
1
0
Fork 0
You've already forked akbasic
Code Issues 29 Pull Requests 1 Actions Packages Projects Releases Wiki Activity
Files
feature/reduce_memory_usage
akbasic/tests/language/numeric/octal_literal.bas

10 lines
406 B
QBasic
Raw Permalink Normal View History

Fix 80-column fixtures and tutorial expectations
2026-08-04 16:14:04 -04:00
10 REM A leading zero is padding, not a radix. The reference selected base 8
20 REM for lexemes starting with 0; 010 printed 8 and 08 was a parse error --
30 REM TODO.md section 6 item 10 is fixed; Commodore BASIC has no octal.
40 REM 0x is the one prefix that changes the base, and now reaches the scanner
Fix five defects the port uncovered in the reference parser and scanner Chained subtraction and exponentiation fold left instead of abandoning the rest of the line -- `1 - 2 - 3` gave -1 and dropped the `- 3`. A unary leaf's operand moves to .left, so a negative literal is one argument again and a second argument no longer overwrites it. An operator in a line's final column survives. Hex literals reach the parser whole. A leading zero is padding, not a radix. Item 16 stays pinned: the fix works and costs an upstream golden case, which is a decision rather than a defect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Andrew Kesterson <andrew@aklabs.net>
2026-07-31 11:35:14 -04:00
50 REM whole: that was section 6 item 15.
60 PRINT 010
70 PRINT 08
80 PRINT 0xff
90 PRINT 0x10 + 1
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 91ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API