XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

floatp


Type:   -   predicate function (subr)
Source:   -   xlbfun.c

Syntax

(floatp expr)
expr - the expression to check
returns -  T  if the value is a floating point number, NIL otherwise

Description

The 'floatp' predicate function 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

See the floatp predicate function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next