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

Units do not append correctly to variables in algebraic entry #1004

Open
mahi2003 opened this issue Jun 30, 2024 · 1 comment
Open

Units do not append correctly to variables in algebraic entry #1004

mahi2003 opened this issue Jun 30, 2024 · 1 comment
Labels
bug Something isn't working user Reported by an actual user, yay!

Comments

@mahi2003
Copy link

It appears that in algebraic entry, units from the UNIT menu append only properly to numbers — not variables:

'() 2 → ✔️ '2_m³ '
'() X → ❌ 'X 1_m³ * ' (this would be valid in RPN entry, but not in algebraic entry)

This is a bit annoying when trying to make an equation with units, like in the EQN menu.

@c3d c3d added bug Something isn't working user Reported by an actual user, yay! labels Jun 30, 2024
@c3d
Copy link
Owner

c3d commented Jun 30, 2024

There are two issues here:

1/ Inserting the wrong thing in an expression

2/ Parsing it without reporting a syntax error.

The parsing of 'X 1_s' generates an object that actually contains the sequence of two objects. This shows as 1_ms on the screen, but when evaluated, we end up with x on the stack and a complaint that we can't multiply, too few arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user Reported by an actual user, yay!
Projects
None yet
Development

No branches or pull requests

2 participants