From 5934c31d6ef4e99512018cf671f4f501e53a3b35 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 9 Jul 2024 00:25:35 -0400 Subject: whichbas: Improve INPUT "PROMPT";VAR (only Turbo supports the semicolon). --- whichbas.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/whichbas.c b/whichbas.c index 490e517..a64ea00 100644 --- a/whichbas.c +++ b/whichbas.c @@ -158,7 +158,18 @@ CALLBACK(handle_cmd) { /* TB, BXL, BXE all support INPUT "Prompt",VAR with the same tokenized form. Atari BASIC doesn't allow string constants in INPUT args. */ if(nexttok == OP_STRCONST) { + int pos_after_string; remove_type(BT_ATARI); + /* TB only: INPUT "Prompt";VAR is also supported (not in BXL/BXE) */ + pos_after_string = pos + 3 + program[pos + 2]; + if(verbose) + fprintf(stderr, + "===> INPUT with string prompt at line %d, " + "pos %04x, pos_after_string %04x (token %02x)\n", + lineno, pos, pos_after_string, program[pos_after_string]); + if(program[pos_after_string] == OP_SEMICOLON) { + remove_type(BT_BXL_BXE); + } } break; case CMD_GET: -- cgit v1.2.3