[ ECLiPSe Recorded Database built-in.|Group Index| Full Index]

is_record(+Key)

Succeeds if Key is a key of a recorded item.

+Key
An atom or compound term.

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.

Fail Conditions

Fails if Key is not a key for a recorded item.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Key is uninstantiated.
(5) Type error
Key is neither an atom nor a compound term.

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, local_record / 1