aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/record.ht
blob: 42900612c6c385bf2eaa0b0729f1f13c99e6578f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
%---------------------------------------------------------------------------
%                   Record Constructor Page
%---------------------------------------------------------------------------

\begin{page}{DomainRecord}{Domain {\em Record(a:A,...,b:B)}}
\beginscroll
{\em Record} takes any number of selector-domain pairs as arguments:
\indentrel{2}
\newline \spad{a}, a selector, an element of domain \spadtype{Symbol}
\newline \spad{A}, a domain of category \spadtype{SetCategory}
\newline\tab{10}...
\newline \spad{b}, a selector, an element of domain \spadtype{Symbol}
\newline \spad{B}, a domain of category \spadtype{SetCategory}
\indentrel{-2}\newline
This constructor is a primitive in \Language{}. 
\newline
\beginmenu
\item\menulispdownlink{Description}{(|dbSpecialDescription| '|Record|)}\tab{15}General description
\item\menulispdownlink{Operations}{(|dbSpecialOperations| '|Record|)}\tab{15}All exported operations of {\em Record(a:A,b:B)}
%\item\menudownlink{Examples}   {RecordExamples}   \tab{15}Examples illustrating use
%\item\menudownlink{Exports}    {RecordExports}    \tab{15}Explicit categories and operations
\endmenu
\vspace{1}\newline
The selectors {\em a,...,b} of a \spad{Record} type must be distinct.
\endscroll\end{page}
 
\begin{page}{RecordDescription}{Domain Constructor {\em Record}}
\beginscroll
\newline\menuitemstyle{}\tab{2}Record({\em a:A},{\em b:B})
\newline\tab{2}{\em Arguments:}\indent{17}\tab{-2}
{\em a}, a selector, an element of domain \spadtype{Symbol}
\newline\tab{-2}
{\em A}, a domain of category \spadtype{SetCategory}
\newline\tab{10}...
\newline\tab{-2}
{\em b}, a selector, an element of domain \spadtype{Symbol}
\newline\tab{-2}
{\em B}, a domain of category \spadtype{SetCategory}
\indent{0}\newline\tab{2}{\em Returns:}\indent{15}\tab{0}
a record object with component objects of type {\em A},...,{\em B} with 
correponding selectors {\em a},...,{\em b}
as described below.
\indent{0}\newline\tab{2}{\em Description:}\indent{15}\tab{0}
{\em Record(a:A,b:B)} is used to create the class of pairs of objects made
up of a value of type {\em A} selected by the symbol {\em a} and
a value of type {\em B} selected by the symbol {\em b}.
In general, the {\em Record} constructor can take any number of arguments and thus can 
be used to create aggregates of 
heterogeneous components of arbitrary size selectable by name.
{\em Record} is a primitive domain of \Language{} which cannot be
defined in the \Language{} language. 
\endscroll
\end{page}