basic: function sequencing block 'DO'

This commit is contained in:
minjaesong
2020-12-10 10:44:12 +09:00
parent 5e9e9ba1ba
commit 1b9a9352a1
3 changed files with 8 additions and 0 deletions

View File

@@ -1090,6 +1090,11 @@ if no arg text were given (e.g. "10 NEXT"), args will have zero length
return akku;
});
},
/* GOTO and GOSUB won't work but that's probably the best...? */
"DO" : function(lnum, args) {
//return resolve(args[args.length - 1]);
return undefined;
},
"OPTIONDEBUG" : function(lnum, args) {
return oneArgNum(lnum, args, (lh) => {
if (lh != 0 && lh != 1) throw lang.syntaxfehler(line);

3
assets/dotest.bas Normal file
View File

@@ -0,0 +1,3 @@
10 DEFUN KA(X)=IF X>2 THEN DO(PRINT("HAI");PRINT(X)) ELSE DO(PRINT("BYE");PRINT(X))
20 INPUT N
30 KA(N)

View File