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.

floatp

floatp

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

SYNTAX

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

DESCRIPTION

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

EXAMPLES

(floatp 1.2)                            ; returns T - float
(floatp '1.2)                           ; returns T - still a float
(setq a 1.234)                          ; 
(floatp a)                              ; returns T - evaluates to float
(floatp 0.0)                            ; returns T - float zero
(floatp 0)                              ; returns NIL - integer zero
(floatp 1)                              ; returns NIL - integer
(floatp #x034)                          ; returns NIL - integer readmacro 
(floatp 'a)                             ; returns NIL - symbol
(floatp #\a)                            ; returns NIL - character
(floatp NIL)                            ; returns NIL - NIL
(floatp #(0 1 2))                       ; returns NIL - array 


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