(lispref.info)Type Predicates

Next: Equality Predicates Prev: Window-System Types Up: Types of Lisp Object

Type Predicates

   The Emacs Lisp interpreter itself does not perform type checking on
the actual arguments passed to functions when they are called.  It could
not do otherwise, since variables in Lisp are not declared to be of a
certain type, as they are in other programming languages.  It is
therefore up to the individual function to test whether each actual
argument belongs to a type that can be used by the function.

   All built-in functions do check the types of their actual arguments
when appropriate and signal a `wrong-type-argument' error if an
argument is of the wrong type.  For example, here is what happens if you
pass an argument to `+' which it cannot handle:

     (+ 2 'a)
          error--> Wrong type argument: integer-or-marker-p, a

   Many functions, called "type predicates", are provided to test
whether an object is a member of a given type.  (Following a convention
of long standing, the names of most Emacs Lisp predicates end in `p'.)

   Here is a table of predefined type predicates, in alphabetical order,
with references to further information.

     Note: atom.

     Note: arrayp.

     Note: bufferp.

     Note: byte-code-function-p.

     Note: case-table-p.

     Note: char-or-string-p.

     Note: commandp.

     Note: consp.

     Note: extentp.

     Note: floatp.

     Note: fontp.

     Note: integer-or-marker-p.

     Note: integerp.

     Note: keymapp.

     Note: listp.

     Note: live-screen-p.

     Note: markerp.

     Note: natnump.

     Note: nlistp.

     Note: numberp.

     Note: number-or-marker-p.

     Note: pixelp.

     Note: pixmapp.

     Note: processp.

     Note: screenp.

     Note: sequencep.

     Note: stringp.

     Note: subrp.

     Note: symbolp.

     Note: syntax-table-p.

     Note: user-variable-p.

     Note: vectorp.

     Note: window-configuration-p.

     Note: windowp.

automatically generated by info2www