DB48X-on-DM42 icon indicating copy to clipboard operation
DB48X-on-DM42 copied to clipboard

Units do not append correctly to variables in algebraic entry

Open mahi2003 opened this issue 1 year ago • 1 comments
trafficstars

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

'() 2 → ✔️ '2_m³ ' '() X → :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.

mahi2003 avatar Jun 30 '24 07:06 mahi2003

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.

c3d avatar Jun 30 '24 12:06 c3d