CONSTANTP
Function CONSTANTP
fully complies with [ANSI CL standard].
Additionally, some non-trivial forms are identified as constants, e.g.,
(
returns CONSTANTP
'(+
1 2 3))T
.
Since DEFCONSTANT
initial value forms are not
evaluated at compile time, CONSTANTP
will not report T
of their
name within the same compilation unit for the null lexical environment.
This is consistent and matches questionable code using the pattern
(
.
Use IF
(CONSTANTP
form
) (EVAL
form
))EVAL-WHEN
if you need recognition and the value during
compile-time.
EVAL-WHEN
EVAL-WHEN
also accepts the situations (NOT EVAL)
and (NOT COMPILE)
.
The situations EVAL
,
LOAD
and COMPILE
are
deprecated by the [ANSI CL standard], and they are not equivalent to the new
standard situations :EXECUTE
,
:LOAD-TOPLEVEL
and :COMPILE-TOPLEVEL
in that they ignore the
top-level form versus non-top-level form distinction.
THE
The special form (
is
similar to THE
value-type
form
)CHECK-TYPE
but does a type check only in interpreted
code (no type check is done in compiled code - but see the EXT:ETHE
macro) and does not allow interactive error correction by the user.
These notes document CLISP version 2.45 | Last modified: 2008-04-15 |