You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing 'N', DB48X creates an equation (type 9), whereas HP calculators create a symbol (type 6). This may cause various problems.
One such problem was already reported for the following program fragment:
'A' 1 →List
This produces { 'A' } on DB48x vs. { A } on HP50G. As a result, a program that used such a fragment to generate { 10 0 N } as an argument for Input was incorrectly generating something that Input would not recognize as requesting numerical input.
The text was updated successfully, but these errors were encountered:
After evaluating options and how HP calculators behave, it looks like they are "complicating" things quite a bit.
Notably, « 'N' N » parses as a program with a quoted and an unquoted name, but { 'N' N } parses as { N N }, which is not very consistent, and makes it quite difficult to programmatically build a program containing a quoted name.
As a matter of fact, I have not found a good way short of parsing text.
In any case, the implications seem to be way too far-reaching for the change to be worth it at that stage. So it's probably better to just document it.
And to reword this issue.
c3d
changed the title
Create a symbol when parsing 'N'
Document that parsing 'N' is different from NFeb 4, 2025
c3d
added a commit
that referenced
this issue
Feb 6, 2025
On HP calculators, `'N'` is a symbol, not an expression, with the
exception of programs.
In other words, `« 'N' N »` parses as you would expect, like on DB48x,
but `{ 'N' N }` parses as `{ N N }`, which makes it a bit difficult to
programmatically build programs without parsing text.
The DB48x approach appears more consistent and easier, so document it
instead of trying to mimic the exact behaviour of HP calculators.
Fixes: #1412
Signed-off-by: Christophe de Dinechin <[email protected]>
When parsing
'N'
, DB48X creates an equation (type 9), whereas HP calculators create a symbol (type 6). This may cause various problems.One such problem was already reported for the following program fragment:
This produces
{ 'A' }
on DB48x vs.{ A }
on HP50G. As a result, a program that used such a fragment to generate{ 10 0 N }
as an argument forInput
was incorrectly generating something thatInput
would not recognize as requesting numerical input.The text was updated successfully, but these errors were encountered: