Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRINT argument highlighting bug #85

Open
ojwb opened this issue Apr 13, 2022 · 1 comment
Open

PRINT argument highlighting bug #85

ojwb opened this issue Apr 13, 2022 · 1 comment

Comments

@ojwb
Copy link
Collaborator

ojwb commented Apr 13, 2022

In P.X. owlet colours X. red thinking it's an invalid token, but this is actually valid BBC BASIC - e.g. this program prints 10:

@%=0:X=1:P.X.

The X. parses as a variable name (X) followed by . as a degenerate floating point literal (with value 0).

@ojwb
Copy link
Collaborator Author

ojwb commented Jan 22, 2025

A related case - this outputs * (followed by a zero byte which isn't visible):

X=42:V.X.

VDU doesn't actually require commas or semicolons between arguments, so this is effectively the same as V.X,. i.e. VDU X, 0.0. This quirk of VDU doesn't appear to be a documented feature however so handling this case correctly seems less important, but it can probably be fixed along with PRINT.

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

No branches or pull requests

1 participant