System variable
%%
In compound statements,
namely block
, lambda
, or (s_1, ..., s_n)
,
%%
is the value of the previous statement.
For example,
block (integrate (x^5, x), ev (%%, x=2) - ev (%%, x=1)); block ([prev], prev: integrate (x^5, x), ev (prev, x=2) - ev (prev, x=1));
yield the same result, namely 21/2
.
A compound statement may comprise other compound statements.
Whether a statement be simple or compound,
%%
is the value of the previous statement.
For example,
block (block (a^n, %%*42), %%/6)
yields 7*a^n
.
Within a compound statement, the value of %%
may be inspected at a break prompt,
which is opened by executing the break
function.
For example, at the break prompt opened by
block (a: 42, break ())$
entering %%;
yields 42
.
At the first statement in a compound statement,
or outside of a compound statement,
%%
is undefined.
%%
is recognized by batch
and load
,
and it has the same meaning as at the interactive prompt.