System variable
_
_
is the most recent input expression (e.g., %i1
, %i2
, %i3
, ...).
_
is assigned the input expression before the input is simplified or evaluated.
However, the value of _
is simplified (but not evaluated) when it is displayed.
_
is recognized by batch
and load
.
In a file processed by batch
,
_
has the same meaning as at the interactive prompt.
In a file processed by load
,
_
is bound to the input expression most recently evaluated at the interactive prompt
or in a batch file;
_
is not bound to the input expressions in the file being processed.
Examples:
(%i1) 13 + 29; (%o1) 42 (%i2) :lisp $_ ((MPLUS) 13 29) (%i2) _; (%o2) 42 (%i3) sin (%pi/2); (%o3) 1 (%i4) :lisp $_ ((%SIN) ((MQUOTIENT) $%PI 2)) (%i4) _; (%o4) 1 (%i5) a: 13$ (%i6) b: 29$ (%i7) a + b; (%o7) 42 (%i8) :lisp $_ ((MPLUS) $A $B) (%i8) _; (%o8) b + a (%i9) a + b; (%o9) 42 (%i10) ev (_); (%o10) 42