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.

numberp

numberp

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

SYNTAX

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

DESCRIPTION

The NUMBERP predicate checks if an <expr> is a number. T is returned if <expr> is an integer or floating point number, NIL is returned otherwise.

EXAMPLES

(numberp 1)                             ; returns T - integer
(numberp 1.2)                           ; returns T - float
(numberp '1)                            ; returns T - still an integer
(numberp #x034)                         ; returns T - readmacro produces
                                        ;             an integer
                                        ;
(numberp 'a)                            ; returns NIL - symbol
(numberp #\a)                           ; returns NIL - character
(numberp NIL)                           ; returns NIL - NIL
(numberp #(0 1 2))                      ; returns NIL - array 


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