XLISP >
XLISP 2.0 -
Contents -
Reference -
Previous |
Next
18 Predicate Functions
- atom - is this an atom ?
- symbolp - is this a symbol ?
- numberp - is this a number ?
- null - is this an empty list ?
- not - is this false ?
- listp - is this a list ?
- endp - is this the end of a list ?
- consp - is this a non-empty list ?
- integerp - is this an integer ?
- floatp - is this a float ?
- stringp - is this a string ?
- characterp - is this a character ?
- arrayp - is this an array ?
- streamp - is this a stream ?
- objectp - is this an object ?
- boundp - is a value bound to this symbol ?
- fboundp - is a functional value bound to this symbol ?
- minusp - is this number negative ?
- zerop - is this number zero ?
- plusp - is this number positive ?
- evenp - is this integer even ?
- oddp - is this integer odd ?
- eq - are the expressions identical ?
- eql - are the expressions identical ?
- equal - are the expressions equal ?
Note: The string predicate functions are described in
Chapter 26, String
Functions, the character predicate functions are described in
Chapter 27, Character
Functions.
- (atom expr)
- is this an atom ?
- expr - the expression to check
returns - T if the value is an atom, NIL otherwise
- (symbolp expr)
- is this a symbol ?
- expr - the expression to check
returns - T if the expression is a symbol, NIL otherwise
- (numberp expr)
- is this a number ?
- expr - the expression to check
returns - T if the expression is a number, NIL otherwise
- (null expr)
- is this an empty list ?
- expr - the list to check
returns - T if the list is empty, NIL otherwise
- (not expr)
- is this false ?
- expr - the expression to check
return - T if the value is NIL, NIL otherwise
- (listp expr)
- is this a list ?
- expr - the expression to check
returns - T if the value is a cons or NIL, NIL otherwise
- (endp list)
- is this the end of a list ?
- list - the list
returns - T if the value is NIL, NIL otherwise
- (consp expr)
- is this a non-empty list ?
- expr - the expression to check
returns - T if the value is a cons, NIL otherwise
- (integerp expr)
- is this an integer ?
- expr - the expression to check
returns - T if the value is an integer, NIL otherwise
- (floatp expr)
- is this a float ?
- expr - the expression to check
returns - T if the value is a float, NIL otherwise
- (stringp expr)
- is this a string ?
- expr - the expression to check
returns - T if the value is a string, NIL otherwise
- (characterp expr)
- is this a character ?
- expr - the expression to check
returns - T if the value is a character, NIL otherwise
- (arrayp expr)
- is this an array ?
- expr - the expression to check
returns - T if the value is an array, NIL otherwise<
- (streamp expr)
- is this a stream ?
- expr - the expression to check
returns - T if the value is a stream, NIL otherwise
- (objectp expr)
- is this an object ?
- expr - the expression to check
returns - T if the value is an object, NIL otherwise
- (boundp sym)
- is a value bound to this symbol ?
- sym - the symbol
returns - T if a value is bound to the symbol, NIL otherwise
- (fboundp sym)
- is a functional value bound to this symbol ?
- sym - the symbol
returns - T if a functional value is bound to the symbol, NIL otherwise
- (minusp expr)
- is this number negative ?
- expr - the number to test
returns - T if the number is negative, NIL otherwise
- (zerop expr)
- is this number zero ?
- expr - the number to test
returns - T if the number is zero, NIL otherwise
- (plusp expr)
- is this number positive ?
- expr - the number to test
returns - T if the number is positive, NIL otherwise
- (evenp expr)
- is this integer even ?
- expr - the integer to test
returns - T if the integer is even, NIL otherwise
- (oddp expr)
- is this integer odd ?
- expr - the integer to test
returns - T if the integer is odd, NIL otherwise
- (eq expr1
expr2) - are the expressions identical ?
- expr1 - the first expression
expr2 - the second expression
returns - T if they are equal, NIL otherwise
- (eql expr1
expr2) - are the expressions identical ?
(works with all numbers)
- expr1 - the first expression
expr2 - the second expression
returns - T if they are equal, NIL otherwise
- (equal expr1
expr2) - are the expressions equal ?
- expr1 - the first expression
expr2 - the second expression
returns - T if they are equal, T otherwise
XLISP >
XLISP 2.0 -
Contents -
Reference -
Previous |
Next