Skip to content

Conversation

@ryangray
Copy link

Fix bug handling the TS2068 "ON ERR" keyword. It was changing toknum/toklen from ON to ON ERR, causing it to skip handling other ON tokens or tokens in between ON and ONERR, notably RESET. Instead, just skip past "ERR" and stay with token "ON", handling the "ON ERR"/"ONERR" token later.

Added support for the TS2068 DELETE keyword that was overlooked in the TS2068 tokens added in v1.7.0.

I bumped the version to 1.8.6.

@ryangray
Copy link
Author

Had to update old Artifact action versions, now checks are passing.

@chris-y
Copy link
Owner

chris-y commented Jun 18, 2025

What's in the massive gap between ON ERR and DELETE?!

@ryangray
Copy link
Author

Since DELETE is decimal 12 and there are no other keywords between that and ON ERR, the existing token search mechanism needed to have empties in bewteen. The top of the loop does check for empties to jump to the next one quickly.

We could put a check at the top of the loop just after it decrements toknum for toknum<123 to change it down to 12. After all, the zx81mode does toknum math for RND, INKEY$, and PI since those are far from the main ZX81 tokens. I can change it do do that if you like.

…12) and added a toknum==122 check to jump it down to 12 instead
@ryangray
Copy link
Author

Okay, made that change. BTW, I'm pretty sure the condition "&& toknum >= 12" (was >= 123) at line 950 is redundant since the token loop condition looks for the NULL at the end of the tokens array.

@chris-y chris-y merged commit 787890f into chris-y:master Jun 20, 2025
3 checks passed
@ryangray ryangray deleted the on-err-fix_add-delete branch June 21, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants