diff --git a/basic.js b/basic.js index a58b55f..e2162bd 100644 --- a/basic.js +++ b/basic.js @@ -1895,7 +1895,7 @@ this.basic = (function() { trailing = false; args.push('lib.comma()'); } else if (test('reserved', kws.SPC) || test('reserved', kws.TAB)) { - trailing = true; + trailing = false; keyword = match('reserved'); match("operator", "("); expr = parseNumericExpression(); diff --git a/reference.html b/reference.html index c11bbe7..b993f49 100644 --- a/reference.html +++ b/reference.html @@ -89,6 +89,9 @@ This is intended as a quick reference for the Applesoft BASIC in Ja
PRINT expr [ [;,] expr ... ] [;]
Output text. ; concatenates, , advances to next tab stop. A trailing ; suppresses line break. + expr can include SPC(aexpr) to advance by + multiple spaces, or TAB(aexpr) to advance by multiple tab stops. +
INPUT [string ;] var [, var ...]
Read line of comma-delimited input, with optional prompt
GET var
Read single key
HOME
Clear text display diff --git a/samples/sample.unittests.txt b/samples/sample.unittests.txt index 3afb5cc..2ee73a6 100644 --- a/samples/sample.unittests.txt +++ b/samples/sample.unittests.txt @@ -358,15 +358,15 @@ 4140 T$ = "SPC Operator" : : SX = PEEK(36) : SY = PEEK(37) -: VTAB 23 : HTAB 1 : PRINT "abc";SPC(10); : T = PEEK(36) -: VTAB 23 : HTAB 1 : PRINT SPC(40); +: VTAB 23 : HTAB 1 : PRINT "abc";SPC(10) : T = PEEK(36) +: VTAB 23 : HTAB 1 : PRINT SPC(40) : POKE 36, SX : POKE 37, SY : S = (T = 13) : GOSUB 1 4150 T$ = "TAB Operator" : : SX = PEEK(36) : SY = PEEK(37) -: VTAB 23 : HTAB 1 : PRINT "abc";TAB(10); : T = PEEK(36) -: VTAB 23 : HTAB 1 : PRINT SPC(40); +: VTAB 23 : HTAB 1 : PRINT "abc";TAB(10) : T = PEEK(36) +: VTAB 23 : HTAB 1 : PRINT SPC(40) : POKE 36, SX : POKE 37, SY : S = (T = 9) : GOSUB 1