[ Recorded Database | Reference Manual | Alphabetic Index ]

is_record(+Key)

Succeeds if Key is a key of a recorded item.
Key
An atom, compound term or handle.

Description

Used to test whether Key is a key of a recorded item. Fails if Key is not a key for a recorded item. In the case of compound terms, all keys of the same name and arity are treated as equal.

Modes and Determinism

Modules

This predicate is sensitive to its module context (tool predicate, see @/2).

Fail Conditions

Fails if Key is not a key for a recorded item

Exceptions

(4) instantiation fault
Key is uninstantiated.
(5) type error
Key is neither atom, compound term, nor record handle.

Examples

   Success:
   [eclipse]: record(whiskey,jameson),
   >        record(whiskey,bushmills),
   >        record(beer,lowenbrau).
   yes.
   [eclipse]: is_record(whiskey).
   yes.
   [eclipse]: is_record(beer).
   yes.
   Fail:
   [eclipse]: is_record(wine).
   no.
   Error:
   is_record(Key).                   (Error 4)
   is_record("whiskey").             (Error 5)

See Also

current_record / 1, record / 1