1
@node Type, GCL Specific, Doc, Top
7
Coerces X to an object of the type TYPE.
15
Returns the type of X.
20
@defun CONSTANTP (symbol)
23
Returns T if the variable named by SYMBOL is a constant; NIL otherwise.
31
Returns T if X is of the type TYPE; NIL otherwise.
39
Returns T if X is a Common Lisp object; NIL otherwise.
44
@defun SUBTYPEP (type1 type2)
47
Returns T if TYPE1 is a subtype of TYPE2; NIL otherwise. If it could not
48
determine, then returns NIL as the second value. Otherwise, the second value
54
@deffn {Macro} CHECK-TYPE
59
(check-type place typespec [string])
62
Signals an error, if the contents of PLACE are not of the specified type.
72
(assert test-form [(@{place@}*) [string @{arg@}*]])
75
Signals an error if the value of TEST-FORM is NIL. STRING is an format string
76
used as the error message. ARGs are arguments to the format string.
81
@deffn {Macro} DEFTYPE
86
(deftype name lambda-list @{decl | doc@}* @{form@}*)
89
Defines a new type-specifier abbreviation in terms of an 'expansion' function
90
(lambda lambda-list1 @{decl@}* @{form@}*)
91
where lambda-list1 is identical to LAMBDA-LIST except that all optional
92
parameters with no default value specified in LAMBDA-LIST defaults to the
93
symbol '*', but not to NIL. When the type system of GCL encounters a
94
type specifier (NAME arg1 ... argn), it calls the expansion function with
95
the arguments arg1 ... argn, and uses the returned value instead of the
96
original type specifier. When the symbol NAME is used as a type specifier,
97
the expansion function is called with no argument. The doc-string DOC, if
98
supplied, is saved as the TYPE doc of NAME, and is retrieved by
99
(documentation 'NAME 'type).
104
@defvr {Declaration} DYNAMIC-EXTENT
106
Declaration to allow locals to be cons'd on the C stack.
108
(defun foo (&rest l) (declare (:dynamic-extent l)) ...)
109
will cause l to be a list formed on the C stack of the foo function
111
Of course passing L out as a value of foo will cause havoc.
112
(setq x (make-list n))
114
(setq x (list a b c ..))
115
also are handled on the stack, for dynamic-extent x.