[ Recorded Database | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic 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, record / 1