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

The layout of expressions after UBOUND() and LBOUND() is wrong #244

Open
mkilgore opened this issue Nov 13, 2022 · 1 comment
Open

The layout of expressions after UBOUND() and LBOUND() is wrong #244

mkilgore opened this issue Nov 13, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@mkilgore
Copy link
Contributor

See the forum post here

Basically, if you have syntax formatting on and you type this:

REDIM c$(1000)
idx = UBOUND(c$) - _HEIGHT - 125

The second line gets incorrectly transformed into this:

REDIM c$(1000)
idx = UBOUND(c$) - _HEIGHT (

It seems like UBOUND() and LBOUND() handling is the culprit, putting anything after the - results is basically the same kind of incorrect transformation.

This is another card that would benefit from #215, as it would allow us to add tests around these cases.

@mkilgore mkilgore added the bug Something isn't working label Nov 13, 2022
@SteveMcNeill
Copy link
Member

This doesn't just affect _HEIGHT. It affects any automatically handled function with a single optional param after lbound/ubound. You can also rule out the REDIM statement and see the glitch with something as simple as:

print lBOUND(c) - _pixelsize - 125

@mkilgore mkilgore added this to Backlog in Backlog/In Progress Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants