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

characterp


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

Syntax

(characterp expr)
expr - the expression to check
returns -  T  if the value is a character, NIL otherwise

Description

The 'characterp' predicate checks if an 'expr' is a character.  T  is returned if 'expr' is a character, NIL is returned otherwise.

Examples

(characterp #\a)       ; returns T - character
(setq a #\b)
(characterp a)         ; returns T - evaluates to char
(characterp "a")       ; returns NIL - string
(characterp '(a b c))  ; returns NIL - list
(characterp 1)         ; returns NIL - integer
(characterp 1.2)       ; returns NIL - float
(characterp 'a)        ; returns NIL - symbol
(characterp #(0 1 2))  ; returns NIL - array
(characterp NIL)       ; returns NIL - NIL

See the characterp predicate function in the XLISP 2.0 manual.

  Back to Top


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