Operations
A programming language that supports record types usually provides some or all of the following operations:
- Declaration of a new record type, including the position, type, and (possibly) name of each field;
- Declaration of variables and values as having a given record type;
- Construction of a record value from given field values and (sometimes) with given field names;
- Selection of a field of a record with an explicit name;
- Assignment of a record value to a record variable;
- Comparison of two records for equality;
- Computation of a standard hash value for the record.
Some languages may provide facilities that enumerate all fields of a record, or at least the fields that are references. This facility is needed to implement certain services such as debuggers, garbage collectors, and serialization. It requires some degree of type polymorphism.
The selection of a field from a record value yields a value.
Read more about this topic: Record (computer Science)
Famous quotes containing the word operations:
“You cant have operations without screams. Pain and the knifetheyre inseparable.”
—Jean Scott Rogers. Robert Day. Mr. Blount (Frank Pettingell)
“Plot, rules, nor even poetry, are not half so great beauties in tragedy or comedy as a just imitation of nature, of character, of the passions and their operations in diversified situations.”
—Horace Walpole (17171797)
“There is a patent office at the seat of government of the universe, whose managers are as much interested in the dispersion of seeds as anybody at Washington can be, and their operations are infinitely more extensive and regular.”
—Henry David Thoreau (18171862)