Object types (object: reserved word)
An object type is a data structure that contains a fixed number of components.
Objects consist of an identifier, a colon and a data type. In addition, object containheaders.
Each component is either a field (which contains data of a particular type) or a method, which performs an operation on the object.
The declaration of a field specifies an identifier that names the field, and its data type. The declaration of aspecifies a , , , or heading.
Field = FieldName(s): type;
Method = procedure MethodName(<parameter(s)>:type);
or = function MethodName(<parameter(s)>:type):type;
or = constructor MethodName(<parameter(s)>: type [;<parameter(s)>:
or = destructor MethodName[(<parameters>: type)];[virtual];
An object type can inherit components from another object type. The inheriting object is a descendant and the object inherited from is an ancestor.
The domain of an object type consists of itself and all its descendants.