Re:Show HN: I made a web-based notepad with a built in unit ...
by wizofaus on Wednesday August 17, 2022 @06:12AM
(#32494342)
Seems to assume + if an arithmetic operator is missing?
[ Parent
| on HN ]
Re:Show HN: I made a web-based notepad with a built in unit ...
by tonyonodi on Wednesday August 17, 2022 @06:30AM
(#32494443)
This is correct, the idea is that you can type things like "6 foot 3 inches" and have it evaluate as an addition. But the example shown above is definitely a problem, I'll try to think of a work around.
Re:Show HN: I made a web-based notepad with a built in unit ...
by wizofaus on Wednesday August 17, 2022 @07:26AM
(#32494778)
I'd think that rule only makes sense after a symbol representing a unit (including potentially 6'3"). Certainly <number> <named constant> should logically assume multiplication.