diff options
Diffstat (limited to 'src/hyper/pages/SEGBIND.ht')
-rw-r--r-- | src/hyper/pages/SEGBIND.ht | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/hyper/pages/SEGBIND.ht b/src/hyper/pages/SEGBIND.ht new file mode 100644 index 00000000..bec87f27 --- /dev/null +++ b/src/hyper/pages/SEGBIND.ht @@ -0,0 +1,54 @@ +% 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} +% |