diff --git a/assets/99.bas b/assets/99.bas index 3cf2950..3d195a1 100644 --- a/assets/99.bas +++ b/assets/99.bas @@ -1,9 +1,7 @@ 1 FOR I = 99 TO 1 -2 (MODE = 1) -3 (GOSUB 12) +2 (MODE = 1):(GOSUB 12) 4 PRINT(I+" bottle"+BOTTLES$+" of beer on the wall, "+i+" bottle"+BOTTLES$+" of beer.") -5 (MODE = 2) -6 (GOSUB 12) +5 (MODE = 2):(GOSUB 12) 7 PRINT("Take one down and pass it around, "+(i-1)+" bottle"+BOTTLES$+" of beer on the wall.") 8 NEXT 9 PRINT "No more bottles of beer on the wall, no more bottles of beer." diff --git a/assets/basic.js b/assets/basic.js index 898a073..8dd53a8 100644 --- a/assets/basic.js +++ b/assets/basic.js @@ -422,7 +422,7 @@ if no arg text were given (e.g. "10 NEXT"), args will have zero length }); }, ":" : function(lnum, args) { // functional sequence - // just do nothing + // TODO alternative method of impl: make syntax tree to have two or more consequent command "roots" and execute from there }, "+" : function(lnum, args) { // addition, string concat return twoArg(lnum, args, function(lh, rh) { return lh + rh; }); @@ -532,13 +532,14 @@ if no arg text were given (e.g. "10 NEXT"), args will have zero length return oneArgNum(lnum, args, function(lh) { if (lh < 0) throw lang.syntaxfehler(lnum, lh); bStatus.gosubStack.push(lnum + 1); + println(lnum+" GOSUB into "+lh); return lh; }); }, "RETURN" : function(lnum, args) { var r = bStatus.gosubStack.pop(); if (r === undefined) throw lang.nowhereToReturn(lnum); - serial.println(lnum+" RETURN to "+r); + println(lnum+" RETURN to "+r); return r; }, "CLEAR" : function(lnum, args) {