remy / txt2bas

ZX Spectrum BASIC conversion tooling (specific support for NextBASIC)
19 stars 0 forks source link

Issue when using -t option with %CODE pseudo variable in NEXTBASIC added in NextZXOS v2.07 #46

Closed dbolli closed 2 months ago

dbolli commented 3 months ago

The %CODE pseudo variable was added to NEXTBASIC in NextZXOS v2.07

In the latest txt2bas v1.21.4 (using -t option)

270 %CODE = %CODE | @10: REM Disable BREAK

causes error message

Only integer functions are allowed in integer expressions, "CODE" at: 6:10#45
> 270 %CODE = %CODE | @10: REM Disable BREAK

A (clumsy) workaround (unless the -t option is removed) is

261 %c = (%CODE)
270 %c = %c | @10: REM Disable BREAK
271 :%CODE = %c
remy commented 2 months ago

I've had this fix sitting offline for over a week - sorry, I'll get it published either today or tomorrow!

dbolli commented 2 months ago

No problem, not using "-t" option is a viable workaround as well as the contortions above 🙂

Thanks for your efforts 👍

github-actions[bot] commented 2 months ago

:tada: This issue has been resolved in version 1.22.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

dbolli commented 2 months ago

Re-tested successfully in updated txt2bas v1.22.1

270 %CODE = %CODE | @10: REM Disable BREAK

now works with -t (test and validate the NextBASIC) option enabled.

Thanks Remy 🙂👍