mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-15 17:04:04 +09:00
basic: function sequencing block 'DO'
This commit is contained in:
@@ -1090,6 +1090,11 @@ if no arg text were given (e.g. "10 NEXT"), args will have zero length
|
|||||||
return akku;
|
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) {
|
"OPTIONDEBUG" : function(lnum, args) {
|
||||||
return oneArgNum(lnum, args, (lh) => {
|
return oneArgNum(lnum, args, (lh) => {
|
||||||
if (lh != 0 && lh != 1) throw lang.syntaxfehler(line);
|
if (lh != 0 && lh != 1) throw lang.syntaxfehler(line);
|
||||||
|
|||||||
3
assets/dotest.bas
Normal file
3
assets/dotest.bas
Normal 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)
|
||||||
Reference in New Issue
Block a user