You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -916,6 +917,10 @@ int main(int argc, char *argv[]) {
916
917
if (alttok) toknum--;
917
918
alttok= !alttok;
918
919
if (**tarrptr==0) continue;
920
+
if (toknum==122) {
921
+
// Skip from toknum 123 (ON ERR) down to 12 (DELETE) as there are no keywords between them in the tokens array
922
+
toknum=12;
923
+
}
919
924
toklen=strlen(*tarrptr);
920
925
// Check for table partition splitting special commands from standard commands (Alistair Neil))
921
926
if (strcmp(*tarrptr, "-----") ==0) {
@@ -942,17 +947,18 @@ int main(int argc, char *argv[]) {
942
947
*/
943
948
if ((*tarrptr)[0] =='<'|| (*tarrptr)[1] =='='||
944
949
((!isalpha(ptr[-1]) && !isalpha(ptr[toklen]) && !( !zx81mode&& ( (toknum==PEEK_TOKEN_NUM) || (toknum==VAL_TOKEN_NUM) ) && ( ptr[toklen] =='$' ))) // :dbolli:20200420 18:54:45 Added check for PEEK that is actually PEEK$ (v1.5.2) // :ryangray:20221120 Added check for VAL that is actually VAL$ (v1.7.2)
945
-
&&toknum >= 123)) { // :dbolli:20200331 14:48:51 Changed from toknum > 150 to include ZX Spectrum Next keywords (v1.5.2)
950
+
&&toknum >= 12)) { // :dbolli:20200331 14:48:51 Changed from toknum > 150 to include ZX Spectrum Next keywords (v1.5.2) :ryangray:20250612 Moved toknum limit to 12 for TS2068 "delete"
946
951
947
-
/* handle the ON keyword that is used by both ZX Spectrum Next ON ERROR and the T/S 2000 ON ERR
948
-
* if ON is followed by ERR then convert from the ZX Spectrum Next ON token to the T/S 2000 ON ERR token
952
+
/* Handle the ON keyword that is used by both ZX Spectrum Next ON ERROR and the T/S 2000 ON ERR
953
+
* If ON is followed by ERR then it's the T/S 2000 ON ERR token not the Spectrum Next ON token,
954
+
* so skip past "ERR" and continue looking for ON tokens. We'll look for "ON ERR" token later.
949
955
*/
950
956
if (!zx81mode&&toknum==ON_TOKEN_NUM) {
951
957
ptr2=ptr+toklen;
952
958
while (*ptr2==' ') ptr2++;
953
959
if (strncmp(ptr2, ERR_TOKEN, ERR_TOKEN_LEN) ==0) {
0 commit comments