diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-14 05:14:52 +0000 |
commit | ab8cc85adde879fb963c94d15675783f2cf4b183 (patch) | |
tree | c202482327f474583b750b2c45dedfc4e4312b1d /src/hyper/pages/VOID.ht | |
download | open-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz |
Initial population.
Diffstat (limited to 'src/hyper/pages/VOID.ht')
-rw-r--r-- | src/hyper/pages/VOID.ht | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/hyper/pages/VOID.ht b/src/hyper/pages/VOID.ht new file mode 100644 index 00000000..4dc87ca3 --- /dev/null +++ b/src/hyper/pages/VOID.ht @@ -0,0 +1,57 @@ +% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved. +% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk. +\newcommand{\VoidXmpTitle}{Void} +\newcommand{\VoidXmpNumber}{9.86} +% +% ===================================================================== +\begin{page}{VoidXmpPage}{9.86 Void} +% ===================================================================== +\beginscroll + +When an expression is not in a value context, it is given type \spadtype{Void}. +For example, in the expression +\begin{verbatim} +r := (a; b; if c then d else e; f) +\end{verbatim} +values are used only from the subexpressions \spad{c} and \spad{f}: all +others are thrown away. +The subexpressions \spad{a}, \spad{b}, \spad{d} and \spad{e} +are evaluated for side-effects only and have type \spadtype{Void}. +There is a unique value of type \spadtype{Void}. + +\xtc{ +You will most often see results of type \spadtype{Void} when you +declare a variable. +}{ +\spadpaste{a : Integer} +} +\noOutputXtc{ +Usually no output is displayed for \spadtype{Void} results. +You can force the display of a rather ugly object by issuing +\spadcmd{)set message void on}. +%-% \HDsyscmdindex{set message void}{VoidXmpPage}{9.86}{Void} +}{ +\spadpaste{)set message void on} +} +\xtc{ +}{ +\spadpaste{b : Fraction Integer} +} +\noOutputXtc{ +}{ +\spadpaste{)set message void off} +} +\xtc{ +All values can be converted to type \spadtype{Void}. +}{ +\spadpaste{3::Void \bound{prev}} +} +\xtc{ +Once a value has been converted to \spadtype{Void}, it cannot be recovered. +}{ +\spadpaste{\% :: PositiveInteger \free{prev}} +} +\endscroll +\autobuttons +\end{page} +% |