Records can be referred to either by handle or by name. Whenever possible, handles should be used, because this naturally leads to robust, reentrant code, and avoids the danger of memory leaks.
When named records are used, the visibility of the record name is local to the module where it was created. A named record never disappears, therefore, in order to free the associated memory, its contents should be erased when no longer needed.
Named records are identified by a functor. This is usually simply an atom, but in general it can be name/arity pair.
The predicates record/2, recorda/2,3, recordz/2,3 implicitly create a record when it has not been declared beforehand. Duplicate record declarations are silently ignored.
?- local record(names). ?- record(names, jim), record(names, ben). ?- recorded_list(names, Names). Names = [jim, ben]