--- bookvol1.org.pamphlet 2006-08-02 14:16:49.000000000 +0200 +++ bookvol1.pamphlet 2006-08-05 01:59:19.734104296 +0200 @@ -421,6 +421,11 @@ \end{array} \right] $$ + +Note the use of ``\%'' here. This means the value of the last +expression we computed. In this case it is the matrix we defined +above. + \returnType{Type: Union(Matrix Fraction Polynomial Complex Integer,...)} \subsection{HyperDoc} @@ -645,10 +650,8 @@ $$ \returnType{Type: Expression Integer} -\index{\%} -Note the use of ``\%'' here. This means the value of the last -expression we computed. In this case it is the long expression -above. +Here again we use ''\%'' for the last result, that is the long expression +above. \subsection{Pattern Matching} @@ -1358,46 +1361,6 @@ $$ \returnType{Type: Fraction Integer} -\subsection{Previous Results} -\label{sec:Previous Results} -\index{\%} -\index{\%\%} -Use the percent sign ``{\tt \%}'' to refer to the last result. -\index{result!previous} Also, use ``{\tt \%\%}' to refer to -previous results. address@hidden ``{\tt \%\%(-1)}'' is -equivalent to ``{\tt \%}'', ``{\tt \%\%(-2)}'' returns the next to -the last result, and so on. ``{\tt \%\%(1)}'' returns the result from -step number 1, ``{\tt \%\%(2)}'' returns the result from step number 2, -and so on. ``{\tt \%\%(0)}'' is not defined. - -This is ten to the tenth power. -\spadcommand{10 ** 10} -$$ -10000000000 -$$ -\returnType{Type: PositiveInteger} - -This is the last result minus one. -\spadcommand{\% - 1} -$$ -9999999999 -$$ -\returnType{Type: PositiveInteger} - -This is the last result. -\spadcommand{\%\%(-1)} -$$ -9999999999 -$$ -\returnType{Type: PositiveInteger} - -This is the result from step number 1. -\spadcommand{\%\%(1)} -$$ -10000000000 -$$ -\returnType{Type: PositiveInteger} - \subsection{Some Types} \label{sec:Some Types} Everything in Axiom has a type. The type determines what operations @@ -1841,8 +1804,7 @@ $$ \returnType{Type: Fraction Integer} -\index{\%} -where ``\%'' represents the previous {\it result} (not the calculation). +where again ``\%'' represents the previous {\it result} (not the calculation). Although Axiom has the ability to work with floating-point numbers to a very high precision it must be remembered that calculations with these @@ -2472,16 +2434,52 @@ \returnType{Type: PositiveInteger} \subsection{Accessing Earlier Results} +\label{sec:Accesing Earlier Results} \index{\%} \index{\%\%} address@hidden address@hidden + The ``\%'' macro represents the result of the previous computation. The ``\%\%'' macro is available which takes a single integer argument. If the argument is positive then it refers to the step number of the calculation where the numbering begins from one and can be seen at the end of each prompt (the number in parentheses). If the argument is negative then it -refers to previous results counting backwards from the last result. That is, -``\%\%(-1)'' is the same as ``\%''. The value of ``\%\%(0)'' is not defined and -will generate an error if requested. +refers to previous results counting backwards from the last result. + +That is,``{\tt \%\%(-1)}'' is equivalent to ``{\tt \%}'', +``{\tt\%\%(-2)}'' returns the next to the last result, and so on. +``{\tt\%\%(1)}'' returns the result from step number 1, ``{\tt \%\%(2)}'' +returns the result from step number 2, and so on. The value of +``\%\%(0)'' is not defined and will generate an error if requested. + +This is ten to the tenth power. +\spadcommand{10 ** 10} +$$ +10000000000 +$$ +\returnType{Type: PositiveInteger} + +This is the last result minus one. +\spadcommand{\% - 1} +$$ +9999999999 +$$ +\returnType{Type: PositiveInteger} + +This is the last result. +\spadcommand{\%\%(-1)} +$$ +9999999999 +$$ +\returnType{Type: PositiveInteger} + +This is the result from step number 1. +\spadcommand{\%\%(1)} +$$ +10000000000 +$$ +\returnType{Type: PositiveInteger} \subsection{Splitting Expressions Over Several Lines} Although Axiom will quite happily accept expressions that are longer than