% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved.
% !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk.
\newcommand{\SegmentBindingXmpTitle}{SegmentBinding}
\newcommand{\SegmentBindingXmpNumber}{9.70}
%
% =====================================================================
\begin{page}{SegmentBindingXmpPage}{9.70 SegmentBinding}
% =====================================================================
\beginscroll

The \spadtype{SegmentBinding} type is used
to indicate a range for a named symbol.

\labelSpace{2pc}
\xtc{
First give the symbol, then an \spadSyntax{=} and finally a
segment of values.
}{
\spadpaste{x = a..b}
}
\xtc{
This is used to provide a convenient
syntax for arguments to certain operations.
}{
\spadpaste{sum(i**2, i = 0..n)}
}
\graphpaste{draw(x**2, x = -2..2)}

\xtc{
The left-hand side must be of type \spadtype{Symbol} but the
right-hand side can be a segment over any type.
}{
\spadpaste{sb := y = 1/2..3/2 \bound{sb}}
}
\xtc{
The left- and right-hand sides can be obtained using the
\spadfunFrom{variable}{SegmentBinding} and
\spadfunFrom{segment}{SegmentBinding} operations.
}{
\spadpaste{variable(sb) \free{sb}}
}
\xtc{
}{
\spadpaste{segment(sb)  \free{sb}}
}

For more information on related topics, see
\downlink{`Segment'}{SegmentXmpPage}\ignore{Segment} and \downlink{`UniversalSegment'}{UniversalSegmentXmpPage}\ignore{UniversalSegment}.
%
\showBlurb{SegmentBinding}
\endscroll
\autobuttons
\end{page}
%
