Post Reply 
Emu48 Underscore Command?
01-01-2021, 05:57 PM
Post: #1
Emu48 Underscore Command?
4:
3:
2:
1: HAPPY_NEW_YEAR_2021
===========================================================
_ Error:
Too Few Arguments

4:
3:
2:
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.
Find all posts by this user
Quote this message in a reply
01-01-2021, 08:04 PM (This post was last modified: 01-01-2021 10:50 PM by Giuseppe Donnini.)
Post: #2
RE: Emu48 Underscore Command?
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.
Find all posts by this user
Quote this message in a reply
01-02-2021, 03:56 AM
Post: #3
RE: Emu48 Underscore Command?
@ Giuseppe Donnini

Very interesting!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)