Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

symbolp

symbolp

type: predicate function (subr)
location: built-in
source file: xllist.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(symbolp <expr> )
        <expr>          -       the expression to check

DESCRIPTION

The SYMBOLP predicate checks if an <expr> is a valid symbol. T is returned if <expr> is a symbol, NIL is returned otherwise. An <expr> that evaluates to an integer, function (subr or otherwise), and so on is not a symbol. However, the quoted (un-evaluated) name of these objects (like 'MYARRAY) is a valid symbol.

EXAMPLES

(symbolp (make-symbol "a"))             ; returns T - symbol
(symbolp 'a)                            ; returns T - symbol
                                        ;
(symbolp #(1 2 3))                      ; returns NIL - array
(symbolp (lambda (x) (print x)))        ; returns NIL - closure 
(symbolp *standard-output*)             ; returns NIL - stream
(symbolp 1.2)                           ; returns NIL - float
(symbolp 2)                             ; returns NIL - integer
(symbolp object)                        ; returns NIL - object
(symbolp "hi")                          ; returns NIL - string
                                        ;
(symbolp #'car)                         ; returns NIL - subr 
(symbolp 'car)                          ; returns T - it is a symbol now
(symbolp '2)                            ; returns NIL - not a symbol


Go to the first, previous, next, last section, table of contents.