Skip to content

Conversation

@TangoBravo64
Copy link
Contributor

@TangoBravo64 TangoBravo64 commented Jan 2, 2026

The BASIC editor in the web interface incorrectly tokenized the parameters of a DATA statement.

Parameters of DATA are not tokenized by Commodore BASIC, so an expression like 1 + 2 has to be treated as a string "1+2", and the "+" character must be preserved. Likewise for any other keywords/characters with tokens.

Fixes bug #552.

Test program:

10 READ A$:PRINT A$
20 IF A$ <> "0" GOTO 10
30 END
100 DATA 1+2,3-2,*,+,-,0

Here's what the expected Commodore BASIC result when entered manually (DATA parameters not tokenized):
BasicTokenizer1

Here's what it incorrectly looked like when the same BASIC text was uploaded via the web interface (DATA parameters incorrectly tokenized):
BasicTokenizer2

The BASIC editor in the web interface incorrectly tokenized the parameters
of a DATA statement.

Parameters of DATA are not tokenized by Commodore BASIC, so an expression
like has to be treated as a string "1+2", and the "+" character must be
preserved. Likewise for any other keywords/characters with tokens.

Fixes bug GideonZ#552.
@GideonZ GideonZ merged commit 9091d92 into GideonZ:master Jan 4, 2026
1 check passed
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