Next: , Previous: , Up: Strings and Characters   [Contents][Index]


10.4 The Predicates for Characters

Function: characterp object

This function returns t if object is a character.

Some functions that work on integers (e.g. the comparison functions <, <=, =, /=, etc. and the arithmetic functions +, -, *, etc.) accept characters and implicitly convert them into integers. In general, functions that work on characters also accept char-ints and implicitly convert them into characters. WARNING: Neither of these behaviors is very desirable, and they are maintained for backward compatibility with old E-Lisp programs that confounded characters and integers willy-nilly. These behaviors may change in the future; therefore, do not rely on them. Instead, convert the characters explicitly using char-int.

Function: integer-or-char-p object

This function returns t if object is an integer or character.