% 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}
%
