RosettaCodeData/Task/Topic-variable/Maxima/topic-variable.maxima

10 lines
209 B
Plaintext

3; /* % won't work if $ is used instead of ; */
[%^2, sqrt(%)];
3$ /* _ works with $ or ; */
[_^2, sqrt(_)];
block(x: 3, [%%^2, sqrt(%%)]);
__+3; /* __ only evaluates itself once to avoid infinite loops */