1 % Copyright (C) 2008, 2009, 2010, 2011, 2012 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17 \includegraphics{clqr-types-and-classes
.1}
20 \caption[]{Precedence Order of System Classes
21 (
\includegraphics{clqr-types-and-classes
.3}),
22 Classes (
\includegraphics{clqr-types-and-classes
.4}),
23 Types (
\includegraphics{clqr-types-and-classes
.2}), and
25 (
\includegraphics{clqr-types-and-classes
.5}).\\
26 Every type is also the supertype of
\NIL, the empty type.
40 \index{STRUCTURE-OBJECT
}%
41 \index{STANDARD-OBJECT
}%
44 \index{BUILT-IN-CLASS
}%
45 \index{STANDARD-CLASS
}%
46 \index{STRUCTURE-CLASS
}%
48 \index{STANDARD-METHOD
}%
49 \index{METHOD-COMBINATION
}%
52 \index{COMPILED-FUNCTION
}%
53 \index{GENERIC-FUNCTION
}%
54 \index{STANDARD-GENERIC-FUNCTION
}%
56 \index{LOGICAL-PATHNAME
}%
71 \index{UNSIGNED-BYTE
}%
80 \index{SIMPLE-STRING
}%
82 \index{SIMPLE-BASE-STRING
}%
83 \index{SIMPLE-VECTOR
}%
85 \index{SIMPLE-BIT-VECTOR
}%
88 \index{TWO-WAY-STREAM
}%
89 \index{SYNONYM-STREAM
}%
90 \index{STRING-STREAM
}%
91 \index{BROADCAST-STREAM
}%
92 \index{CONCATENATED-STREAM
}%
94 \index{EXTENDED-CHAR
}%
96 \index{STANDARD-CHAR
}%
98 \index{SERIOUS-CONDITION
}%
99 \index{STORAGE-CONDITION
}%
100 \index{SIMPLE-TYPE-ERROR
}%
103 \index{PROGRAM-ERROR
}%
104 \index{CONTROL-ERROR
}%
105 \index{PACKAGE-ERROR
}%
106 \index{PRINT-NOT-READABLE
}%
107 \index{STREAM-ERROR
}%
111 \index{ARITHMETIC-ERROR
}%
112 \index{SIMPLE-CONDITION
}%
114 \index{STYLE-WARNING
}%
115 \index{SIMPLE-ERROR
}%
116 \index{SIMPLE-WARNING
}%
117 \index{UNDEFINED-FUNCTION
}%
118 \index{UNBOUND-VARIABLE
}%
119 \index{UNBOUND-SLOT
}%
121 \index{READER-ERROR
}%
122 \index{DIVISION-BY-ZERO
}%
123 \index{FLOATING-POINT-INEXACT
}%
124 \index{FLOATING-POINT-OVERFLOW
}%
125 \index{FLOATING-POINT-UNDERFLOW
}%
126 \index{FLOATING-POINT-INVALID-OPERATION
}%
130 For any class, there is always a corresponding type of the same name.
134 \IT{(
\FU*
{TYPEP
} \VAR{foo
} \VAR{type
} \Op{\VAR{environment
}\DF{\NIL}})
}
136 \retval{\T} if
\VAR{foo
} is of
\VAR{type
}.
139 \IT{(
\FU*
{SUBTYPEP
} \VAR{type-a
} \VAR{type-b
}
140 \Op{\VAR{environment
}})
}
142 Return
\retval{\T} if
\VAR{type-a
} is a recognizable subtype of
143 \VAR{type-b
}, and
\retvalii{\NIL} if the relationship could not be
147 \IT{(
\SO*
{THE
} \NEV{\VAR{type
}} \VAR{form
})
}
149 Declare
\retval{values of
\VAR{form
}} to be of
153 \IT{(
\FU*
{COERCE
} \VAR{object
} \VAR{type
})
}
155 Coerce
\retval{\VAR{object
}} into
\VAR{type
}.
158 \IT{(
\MC*
{TYPECASE
} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}} \PROGN{\VAR{a-form
}})
}
159 \OP{(
\xorGOO{\kwd*
{OTHERWISE
}\\
160 \T}{\
}} \PROGN{\VAR{b-form
}\DF{\NIL}})
})
}
162 Return
\retval{values of the
\VAR{a-form
}s
} whose
\VAR{type
} is
163 \VAR{foo
} of. Return
\retval{values of
\VAR{b-form
}s
} if no
171 \OPn{(
\NEV{\VAR{type
}} \PROGN{\VAR{form
}})
})
}
173 Return
\retval{values
} of the first
\OPn{\VAR{form
}} whose
\VAR{type
} is
174 \VAR{foo
} of. Signal non-correctable/correctable
\kwd{type-error
}
175 if no
\VAR{type
} matches.
178 \IT{(
\FU*
{TYPE-OF
} \VAR{foo
})
}
180 \retval{Type of
\VAR{foo
}}.
183 \IT{(
\MC*
{CHECK-TYPE
} \VAR{place
} \VAR{type
}
184 \Op{\VAR{string
}\DF{\Goo{\LIT{a
}\XOR\LIT{an
}}\hspace{.3ex
}\VAR{type
}}})
}
186 Signal correctable
\kwd{type-error
} if
\VAR{place
} is
187 not of
\VAR{type
}. Return
\retval{\NIL}.
190 \IT{(
\FU*
{STREAM-ELEMENT-TYPE
} \VAR{stream
})
}
192 \retval{Type
} of
\VAR{stream
} objects.
195 \IT{(
\FU*
{ARRAY-ELEMENT-TYPE
} \VAR{array
})
}
197 Element
\retval{type
} \VAR{array
} can hold.
200 \IT{(
\FU*
{UPGRADED-ARRAY-ELEMENT-TYPE
} \VAR{type
}
201 \Op{\VAR{environment
}\DF{\NIL}})
}
203 \retval{Element type
} of most specialized array capable of holding
204 elements of
\VAR{type
}.
207 \IT{(
\MC*
{DEFTYPE
} \VAR{foo
} (
\OPn{\VAR{macro-$
\lambda$
}})
208 \OPn{(
\kwd{declare
} \OPn{\NEV{\VAR{decl
}}})
} \Op{\NEV{\VAR{doc
}}}
211 Define type
\retval{\VAR{foo
}} which when referenced as (
\VAR{foo
}
212 \OPn{\NEV{\VAR{arg
}}}) (or as
\VAR{foo
} if
\VAR{macro-$
\lambda$
}
213 doesn't contain any required parameters) applies expanded
\VAR{form
}s to
\VAR{arg
}s
214 returning the new type. For (
\OPn{\VAR{macro-$
\lambda$
}}) see
215 page
\pageref{section:Macros
} but with default value of
\kwd{\A}
216 instead of
\NIL.
\VAR{form
}s are enclosed in an implicit
\SO{block
}
220 \IT{\arrGOO{(
\kwd*
{EQL
} \VAR{foo
})\\
221 (
\kwd*
{MEMBER
} \OPn{\VAR{foo
}})
}{.
}}
223 Specifier for a type comprising
\VAR{foo
} or
\VAR{foo
}s.
226 \IT{(
\kwd*
{SATISFIES
} \VAR{predicate
})
}
228 Type specifier for all objects satisfying
\VAR{predicate
}.
231 \IT{(
\kwd*
{MOD
} \VAR{n
})
}
233 Type specifier for all non-negative integers $<n$.
236 \IT{(
\kwd*
{NOT
} \VAR{type
})
}
241 \IT{(
\kwd*
{AND
} \OPn{\VAR{type
}}\DF{\T})
}
243 Type specifier for intersection of
\VAR{type
}s.
246 \IT{(
\kwd*
{OR
} \OPn{\VAR{type
}}\DF{\NIL})
}
248 Type specifier for union of
\VAR{type
}s.
251 \IT{(
\kwd*
{VALUES
} \OPn{\VAR{type
}} \OP{\OPn{\kwd{\&optional
} \VAR{type
}}
252 \Op{\kwd{\&rest
} \VAR{other-args
}}})
}
254 Type specifier for multiple values.
260 As a type argument (cf.\ Figure
\ref{data-types
}): no restriction.
268 %%% TeX-master: "clqr"