| Did you know ... | Search Documentation: |
| Predicate record/1 |
Used a directive, :- record Constructor(Arg, ...) is expanded
info the following predicates:
<constructor>_<name>(Record, Value)<constructor>_data(?Name, ?Record, ?Value)default_<constructor>(-Record)is_<constructor>(@Term)make_<constructor>(+Fields, -Record)make_<constructor>(+Fields, -Record, -RestFields)set_<name>_of_<constructor>(+Value, +OldRecord, -New)set_<name>_of_<constructor>(+Value, !Record)nb_set_<name>_of_<constructor>(+Value, !Record)set_<constructor>_fields(+Fields, +Record0, -Record).set_<constructor>_fields(+Fields, +Record0, -Record, -RestFields).set_<constructor>_field(+Field, +Record0, -Record).user:current_record(?<name>, :<constructor>).In the above, the Fields arguments are a list of the form Name(Value). If a name appears more than once, the last value is used. For make_<constructor>/3, RestFields gets a list of Name(Value) that were not used; make_<constructor>/2 requires that all the names are in the record.
These predicates fail if there is an error (e.g., if make_<constructor>/2 has a field name that isn't in the record); the exceptions are if type checking throws an exception.