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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
18 \includegraphics{clqr-types-and-classes
.1}
32 \index{STRUCTURE-OBJECT
}%
33 \index{STANDARD-OBJECT
}%
36 \index{BUILT-IN-CLASS
}%
37 \index{STANDARD-CLASS
}%
38 \index{STRUCTURE-CLASS
}%
40 \index{STANDARD-METHOD
}%
41 \index{METHOD-COMBINATION
}%
44 \index{COMPILED-FUNCTION
}%
45 \index{GENERIC-FUNCTION
}%
46 \index{STANDARD-GENERIC-FUNCTION
}%
48 \index{LOGICAL-PATHNAME
}%
63 \index{UNSIGNED-BYTE
}%
72 \index{SIMPLE-STRING
}%
74 \index{SIMPLE-BASE-STRING
}%
75 \index{SIMPLE-VECTOR
}%
77 \index{SIMPLE-BIT-VECTOR
}%
80 \index{TWO-WAY-STREAM
}%
81 \index{SYNONYM-STREAM
}%
82 \index{STRING-STREAM
}%
83 \index{BROADCAST-STREAM
}%
84 \index{CONCATENATED-STREAM
}%
86 \index{EXTENDED-CHAR
}%
88 \index{STANDARD-CHAR
}%
90 \index{SERIOUS-CONDITION
}%
91 \index{STORAGE-CONDITION
}%
92 \index{SIMPLE-TYPE-ERROR
}%
95 \index{PROGRAM-ERROR
}%
96 \index{CONTROL-ERROR
}%
97 \index{PACKAGE-ERROR
}%
98 \index{PRINT-NOT-READABLE
}%
103 \index{ARITHMETIC-ERROR
}%
104 \index{SIMPLE-CONDITION
}%
106 \index{STYLE-WARNING
}%
107 \index{SIMPLE-ERROR
}%
108 \index{SIMPLE-WARNING
}%
109 \index{UNDEFINED-FUNCTION
}%
110 \index{UNBOUND-VARIABLE
}%
111 \index{UNBOUND-SLOT
}%
113 \index{READER-ERROR
}%
114 \index{DIVISION-BY-ZERO
}%
115 \index{FLOATING-POINT-INEXACT
}%
116 \index{FLOATING-POINT-OVERFLOW
}%
117 \index{FLOATING-POINT-UNDERFLOW
}%
118 \index{FLOATING-POINT-INVALID-OPERATION
}%
119 \caption{Data Types.
}%
122 For any class, there is always a corresponding type of the same name.
126 \IT{(
\FU*
{TYPEP
} \VAR{foo
} \VAR{type
} \Op{\VAR{environment
}\DF{\NIL}})
}
128 Return
\retval{\T} if
\VAR{foo
} is of
\VAR{type
}.
131 \IT{(
\FU*
{SUBTYPEP
} \VAR{type-a
} \VAR{type-b
}
132 \Op{\VAR{environment
}})
}
134 Return
\retval{\T} if
\VAR{type-a
} is a recognizable subtype of
135 \VAR{type-b
}, and
\retvalii{\NIL} if the relationship could not be
139 \IT{(
\SO*
{THE
} \NEV{\VAR{type
}} \VAR{form
})
}
141 Return
\retval{values
} of
\VAR{form
} which are declared to be of
145 \IT{(
\FU*
{COERCE
} \VAR{object
} \VAR{type
})
}
147 Coerce
\VAR{object
} into
\VAR{type
}.
150 \IT{(
\MC*
{TYPECASE
} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}} \PROGN{\VAR{a-form
}})
}
151 \OP{(
\xorGOO{\kwd*
{OTHERWISE
}\\
152 \T}{\
}} \PROGN{\VAR{b-form
}\DF{\NIL}})
})
}
154 Return
\retval{values of the
\VAR{a-form
}s
} whose
\VAR{type
} is
155 \VAR{foo
} of. Return
\retval{values of
\VAR{b-form
}s
} if no
159 \IT{(
\xorGOO{\MC*
{CTYPECASE
}\\
160 \MC*
{ETYPECASE
}}{\
}} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}}
161 \PROGN{\VAR{form
}})
})
}
163 Return
\retval{values of the
\VAR{form
}s
} whose
\VAR{type
} is
164 \VAR{foo
} of. Signal correctable/non-correctable error, respectively
165 if no
\VAR{type
} matches.
168 \IT{(
\FU*
{TYPE-OF
} \VAR{foo
})
}
170 \retval{Type of
\VAR{foo
}}.
173 \IT{(
\kwd*
{CHECK-TYPE
} \VAR{place
} \VAR{type
} \Op{\VAR{string
}})
}
175 Return
\retval{\NIL} and signal correctable
\kwd{type-error
} if
\VAR{place
} is
179 \IT{(
\FU*
{STREAM-ELEMENT-TYPE
} \VAR{stream
})
}
181 Return
\retval{type
} of
\VAR{stream
} objects.
184 \IT{(
\FU*
{ARRAY-ELEMENT-TYPE
} \VAR{array
})
}
186 Element
\retval{type
} \VAR{array
} can hold.
189 \IT{(
\FU*
{UPGRADED-ARRAY-ELEMENT-TYPE
} \VAR{type
}
190 \Op{\VAR{environment
}\DF{\NIL}})
}
192 \retval{Element type
} of most specialized array capable of holding
193 elements of
\VAR{type
}.
196 \IT{(
\MC*
{DEFTYPE
} \VAR{foo
} (
\OPn{\VAR{macro-$
\lambda$
}})
197 \OPn{(
\kwd{declare
} \OPn{\NEV{\VAR{decl
}}})
} \Op{\NEV{\VAR{doc
}}}
200 Define type
\retval{\VAR{foo
}} which when referenced as (
\VAR{foo
}
201 \OPn{\NEV{\VAR{arg
}}}) applies expanded
\VAR{form
}s to
\VAR{arg
}s
202 returning the new type. For (
\OPn{\VAR{macro-$
\lambda$
}}) see
203 p.~
\pageref{section:Macros
} but with default value of
\kwd{\A}
204 instead of
\NIL.
\VAR{form
}s are enclosed in an implicit
\SO{block
} \VAR{foo
}.
207 \IT{\arrGOO{(
\kwd*
{EQL
} \VAR{foo
})\\
208 (
\kwd*
{MEMBER
} \OPn{\VAR{foo
}})
}{.
}}
210 Specifier for a type comprising
\VAR{foo
} or
\VAR{foo
}s.
213 \IT{(
\kwd*
{SATISFIES
} \VAR{predicate
})
}
215 Type specifier for all objects satisfying
\VAR{predicate
}.
218 \IT{(
\kwd*
{MOD
} \VAR{n
})
}
220 Type specifier for all non-negative integers $<n$.
223 \IT{(
\kwd*
{NOT
} \VAR{type
})
}
228 \IT{(
\kwd*
{AND
} \OPn{\VAR{type
}}\DF{\T})
}
230 Type specifier for intersection of
\VAR{type
}s.
233 \IT{(
\kwd*
{OR
} \OPn{\VAR{type
}}\DF{\NIL})
}
235 Type specifier for union of
\VAR{type
}s.
238 \IT{(
\kwd*
{VALUES
} \OPn{\VAR{type
}} \OP{\OPn{\kwd{\&optional
} \VAR{type
}}
239 \Op{\kwd{\&rest
} \VAR{other-args
}}})
}
241 Type specifier for multiple values.
250 %%% TeX-master: "clqr"