HP Forums
Emu48 Underscore Command? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Emu48 Underscore Command? (/thread-16106.html)

Emu48 Underscore Command? - MNH - 01-01-2021 05:57 PM

_ Error:
Too Few Arguments

1: ""

Prior to my earliest post today, I was trying to create the above directory. Upon entering the name on the stack, I received the above message. I don't ever remember seeing an underscore command anywhere. Please explain.

RE: Emu48 Underscore Command? - Giuseppe Donnini - 01-01-2021 08:04 PM

Here is the full explanation as given by Dr. William Wickes himself on comp.sys.handhelds (on May, 1st, 1990):

The "formunit" operator "_" is a hybrid beast that is half delimiter, half
infix operator. It began life as a delimiter to identify unit objects
in the command line, with complications due to its position between
two objects--a real number and a unit expression--unlike most delimiters,
which precede or surround their target text. _ became a function
in order to support its entry in the EquationWriter, so that there does
not need to be special code for the expression following the _.

When you enter a _ in the command line, it acts as a delimiter iff it
is preceded by a valid real number, in which case it insists on being
followed by a unit expression, without intervening spaces or other
delimiters. Thus 'expression' 1 _m ENTER returns 'expression' and 1_m,
whereas 'expression' 1 _ m ENTER is a syntax error (because of the
space following the _.

If _ is not preceded by a real number, it is compiled as a stand-alone
function, which has this stack diagram:

symb real ==> 'symb*real' (same as *)
symb unit ==> 'symb*unit' (same as *)
symb 'expr' ==> 'symb_expr'

Here "symb" is an algebraic object or substitute--real, complex, or name;
'expr' is an algebraic or name object.

_ is not described as a function in the owner's manual simply because
its explanation is a bit mysterious, and it has no particular practical
use--you can use * or ->UNIT instead.

RE: Emu48 Underscore Command? - MNH - 01-02-2021 03:56 AM

@ Giuseppe Donnini

Very interesting!