diff options
-rw-r--r-- | whichbas.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -275,8 +275,8 @@ CALLBACK(handle_op) { } } + /* 59: INKEY$ (pseudo-function) in TB, string array separator semicolon in BXL/BXE */ if(tok == 0x59) { - /* INKEY$ (pseudo-function) in TB, string array separator semicolon in BXL/BXE */ if(nexttok == OP_NUMCONST || nexttok >= 0x80) { /* INKEY$ may not be followed by a numeric constant or a variable of any kind */ remove_type(BT_TURBO); @@ -284,15 +284,15 @@ CALLBACK(handle_op) { } /* 5a: EXOR (infix num op) or BUMP( (pseudo-function, no OP_FUNC_LPAR) */ - if(tok == 0x5a) { + /* 5d: DIV (infix num op) or RANDOM( (pseudo-func, 1 or 2 num args) */ + if(tok == 0x5a || tok == 0x5d) { /* XXX: incomplete */ if(last_cmd_pos == pos - 1) { - /* partial: if the last token was a command, this *can't* - be EXOR (it's infix). */ + /* partial: if the last token was a command, this *can't* be infix.*/ remove_type(BT_TURBO); } else if(program[pos - 1] >= 0x80) { /* partial: if the last token was a variable, this can't - be BUMP (it's a function, last token has to be a command + be a function (last token would have to have been a command or a regular operator). however, Turbo BASIC allows up to 256 variables, this only catches the first 128. */ remove_type(BT_BXL_BXE); @@ -319,7 +319,7 @@ CALLBACK(handle_op) { } } - /* 5d: DIV (infix num op) or RANDOM( (pseudo-func, 1 or 2 num args) */ + /* 5d: see 5a, above (same logic). */ /* 5e! FRAC (num func, 1 arg) or DPEEK (num func, 1 arg), can't tell apart :( */ if(tok == 0x5f) { |