1 % Copyright (C) 2008, 2009, 2010 Bert Burgemeister
3 % Permission is granted to copy, distribute and/or modify this
4 % document under the terms of the GNU Free Documentation License,
5 % Version 1.2 or any later version published by the Free Software
6 % Foundation; with no Invariant Sections, no Front-Cover Texts and
7 % no Back-Cover Texts. For details see file COPYING.
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \section{Types and Classes
}
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
23 %%% \kwd*{REAL } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
25 %%% \kwd*{RATIONAL } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
27 %%% \kwd*{INTEGER } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
29 %%% \kwd*{SIGNED-BYTE } \Op{\VAR{size}\DF{\kwd{\A}}}\\
30 %%% \boxGOO{\kwd*{UNSIGNED-BYTE } \Op{\VAR{size}\DF{\kwd{\A}}}
31 %%% \boxGOO{\kwd*{BIT} }}\boxGOOcr
35 %%% \kwd*{RATIO}}\boxGOOcr
36 %%% \kwd*{FLOAT } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
38 %%% \kwd*{SHORT-FLOAT } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
39 %%% \kwd*{SINGLE-FLOAT } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
40 %%% \kwd*{DOUBLE-FLOAT } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}\\
41 %%% \kwd*{LONG-FLOAT } \OP{\VAR{lower-limit}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit}\DF{\kwd{\A}}}}}}\boxGOOcr
42 %%% \kwd*{COMPLEX } \Op{\VAR{type}\DF{\kwd{\A}}}}\boxGOOcr
47 %%% \kwd*{CONS } \OP{\VAR{car-type}\DF{\kwd{\A}}\text{ }\Op{\VAR{cdr-type}\DF{\kwd{\A}}}}\\
48 %%% \kwd*{SYMBOL}\footnotemark[2]
50 %%% \kwd*{NULL}}}\boxGOOcr
51 %%% \kwd*{ARRAY}\footnotemark[2] \OP{\VAR{type}\DF{\kwd{\A}}\text{ }\Op{\VAR{rank}\DF{\kwd{\A}}\XOR(\OPn{\VAR{dimension}})}}\\
53 %%% \kwd*{SIMPLE-ARRAY}\footnotemark[2] \OP{\VAR{type}\DF{\kwd{\A}}\text{ }\Op{\VAR{rank}\DF{\kwd{\A}}\XOR(\OPn{\VAR{dimension}})}}\\
55 %%% \kwd*{VECTOR}\footnotemark[2] \OP{\VAR{type}\DF{\kwd{\A}}\text{ }\Op{\VAR{size}\DF{\kwd{\A}}}}\\
57 %%% \kwd*{BIT-VECTOR}\footnotemark[2] \Op{\VAR{size}\DF{\kwd{\A}}}\\
59 %%% \kwd*{SIMPLE-BIT-VECTOR } \Op{\VAR{size}\DF{\kwd{\A}}}}\boxGOOcr
60 %%% \kwd*{STRING}\footnotemark[2] \Op{\VAR{size}\DF{\kwd{\A}}}\\
62 %%% \kwd*{SIMPLE-STRING } \Op{\VAR{size}\DF{\kwd{\A}}}\\
64 %%% \kwd*{BASE-STRING}\footnotemark[2] \Op{\VAR{size}\DF{\kwd{\A}}}\\
66 %%% \kwd*{SIMPLE-BASE-STRING } \Op{\VAR{size}\DF{\kwd{\A}}}}}}\boxGOOcr
67 %%% \kwd*{SIMPLE-VECTOR } \Op{\VAR{size}\DF{\kwd{\A}}}}}\boxGOOcr
68 %%% \kwd*{VECTOR } \OP{\VAR{type}\DF{\kwd{\A}}\text{ }\Op{\VAR{size}\DF{\kwd{\A}}}}\\
70 %%% \kwd*{STRING } \Op{\VAR{size}\DF{\kwd{\A}}}
72 %%% \kwd*{BASE-STRING } \Op{\VAR{size}\DF{\kwd{\A}}}}\boxGOOcr
73 %%% \kwd*{BIT-VECTOR } \Op{\VAR{size}\DF{\kwd{\A}}}}}}\boxGOOcr
74 %%% \kwd*{ARRAY} \OP{\VAR{type}\DF{\kwd{\A}}\text{ }\Op{\VAR{rank}\DF{\kwd{\A}}\XOR(\OPn{\VAR{dimension}})}}\\
76 %%% \kwd*{SIMPLE-ARRAY} \OP{\VAR{type}\DF{\kwd{\A}}\text{ }\Op{\VAR{rank}\DF{\kwd{\A}}\XOR(\OPn{\VAR{dimension}})}}
82 %%% \kwd*{STANDARD-CHAR}}\boxGOOcr
83 %%% \kwd*{EXTENDED-CHAR}}\boxGOOcr
86 %%% \kwd*{FILE-STREAM};\>
87 %%% \kwd*{TWO-WAY-STREAM};\>
88 %%% \kwd*{SYNONYM-STREAM};\\
89 %%% \kwd*{STRING-STREAM};\>
90 %%% \kwd*{BROADCAST-STREAM};\>
91 %%% \kwd*{ECHO-STREAM};\\
92 %%% \kwd*{CONCATENATED-STREAM}}\boxGOOcr
95 %%% \kwd*{LOGICAL-PATHNAME}}\boxGOOcr
99 %%% \kwd*{BOOLEAN}}\boxGOOcr
100 %%% \kwd*{FUNCTION } \OP{\VAR{arg-types }\Op{\VAR{value-types}}}\\
102 %%% \kwd*{GENERIC-FUNCTION}
103 %%% \boxGOO{\kwd*{STANDARD-GENERIC-FUNCTION}}\boxGOOcr
104 %%% \kwd*{COMPILED-FUNCTION}}\boxGOOcr
105 %%% \kwd*{STANDARD-OBJECT}
109 %%% \kwd*{STANDARD-CLASS};\>
110 %%% \kwd*{BUILT-IN-CLASS};\\
111 %%% \kwd*{STRUCTURE-CLASS}}\boxGOOcr
112 %%% \kwd*{METHOD}\footnotemark[2]
114 %%% \kwd*{STANDARD-METHOD}}}\boxGOOcr
116 %%% \kwd*{HASH-TABLE};\>
117 %%% \kwd*{STRUCTURE-OBJECT};\>
118 %%% \kwd*{PACKAGE};\>
119 %%% \kwd*{READTABLE};\\
120 %%% \kwd*{RANDOM-STATE};\>
121 %%% \kwd*{RESTART};\>
123 %%% \kwd*{METHOD-COMBINATION}}}
124 \includegraphics{clqr-types-and-classes
.1}
127 %%% {\footnotesize\footnotemark[2]For supertypes of this
128 %%% type look for the instance without a \footnotemark[2].}\\
129 %%% {\footnotesize As a type argument, \kwd{\A} means no restriction.\index{*@\A}}
131 \caption{Data Types.
}%
134 For any class, there is always a corresponding type of the same name.
138 \IT{(
\FU*
{TYPEP
} \VAR{foo
} \VAR{type
} \Op{\VAR{environment
}\DF{\NIL}})
}
140 Return
\retval{\T} if
\VAR{foo
} is of
\VAR{type
}.
143 \IT{(
\FU*
{SUBTYPEP
} \VAR{type-a
} \VAR{type-b
}
144 \Op{\VAR{environment
}})
}
146 Return
\retval{\T} if
\VAR{type-a
} is a recognizable subtype of
147 \VAR{type-b
}, and
\retvalii{\NIL} if the relationship could not be
151 \IT{(
\SO*
{THE
} \NEV{\VAR{type
}} \VAR{form
})
}
153 Return
\retval{values
} of
\VAR{form
} which are declared to be of
157 \IT{(
\FU*
{COERCE
} \VAR{object
} \VAR{type
})
}
159 Coerce
\VAR{object
} into
\VAR{type
}.
162 \IT{(
\MC*
{TYPECASE
} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}} \PROGN{\VAR{a-form
}})
}
163 \OP{(
\xorGOO{\kwd*
{OTHERWISE
}\\
164 \T}{\
}} \PROGN{\VAR{b-form
}\DF{\NIL}})
})
}
166 Return
\retval{values of the
\VAR{a-form
}s
} whose
\VAR{type
} is
167 \VAR{foo
} of. Return
\retval{values of
\VAR{b-form
}s
} if no
171 \IT{(
\xorGOO{\MC*
{CTYPECASE
}\\
172 \MC*
{ETYPECASE
}}{\
}} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}}
173 \PROGN{\VAR{form
}})
})
}
175 Return
\retval{values of the
\VAR{form
}s
} whose
\VAR{type
} is
176 \VAR{foo
} of. Signal correctable/non-correctable error, respectively
177 if no
\VAR{type
} matches.
180 \IT{(
\FU*
{TYPE-OF
} \VAR{foo
})
}
182 \retval{Type of
\VAR{foo
}}.
185 \IT{(
\kwd*
{CHECK-TYPE
} \VAR{place
} \VAR{type
} \Op{\VAR{string
}})
}
187 Return
\retval{\NIL} and signal correctable
\kwd{type-error
} if
\VAR{place
} is
191 \IT{(
\FU*
{STREAM-ELEMENT-TYPE
} \VAR{stream
})
}
193 Return
\retval{type
} of
\VAR{stream
} objects.
196 \IT{(
\FU*
{ARRAY-ELEMENT-TYPE
} \VAR{array
})
}
198 Element
\retval{type
} \VAR{array
} can hold.
201 \IT{(
\FU*
{UPGRADED-ARRAY-ELEMENT-TYPE
} \VAR{type
}
202 \Op{\VAR{environment
}\DF{\NIL}})
}
204 \retval{Element type
} of most specialized array capable of holding
205 elements of
\VAR{type
}.
208 \IT{(
\MC*
{DEFTYPE
} \VAR{foo
} (
\OPn{\VAR{macro-$
\lambda$
}})
209 \OPn{(
\kwd{declare
} \OPn{\NEV{\VAR{decl
}}})
} \Op{\NEV{\VAR{doc
}}}
212 Define type
\retval{\VAR{foo
}} which when referenced as (
\VAR{foo
}
213 \OPn{\NEV{\VAR{arg
}}}) applies expanded
\VAR{form
}s to
\VAR{arg
}s
214 returning the new type. For (
\OPn{\VAR{macro-$
\lambda$
}}) see
215 p.~
\pageref{section:Macros
} but with default value of
\kwd{\A}
216 instead of
\NIL.
\VAR{form
}s are enclosed in an implicit
\SO{block
} \VAR{foo
}.
219 \IT{\arrGOO{(
\kwd*
{EQL
} \VAR{foo
})\\
220 (
\kwd*
{MEMBER
} \OPn{\VAR{foo
}})
}{.
}}
222 Specifier for a type comprising
\VAR{foo
} or
\VAR{foo
}s.
225 \IT{(
\kwd*
{SATISFIES
} \VAR{predicate
})
}
227 Type specifier for all objects satisfying
\VAR{predicate
}.
230 \IT{(
\kwd*
{MOD
} \VAR{n
})
}
232 Type specifier for all non-negative integers $<n$.
235 \IT{(
\kwd*
{NOT
} \VAR{type
})
}
240 \IT{(
\kwd*
{AND
} \OPn{\VAR{type
}}\DF{\T})
}
242 Type specifier for intersection of
\VAR{type
}s.
245 \IT{(
\kwd*
{OR
} \OPn{\VAR{type
}}\DF{\NIL})
}
247 Type specifier for union of
\VAR{type
}s.
250 \IT{(
\kwd*
{VALUES
} \OPn{\VAR{type
}} \OP{\OPn{\kwd{\&optional
} \VAR{type
}}
251 \Op{\kwd{\&rest
} \VAR{other-args
}}})
}
253 Type specifier for multiple values.
262 %%% TeX-master: "clqr"