| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
type
record type identifier = record
field identifier: type definition;
...
field identifier: type definition;
end;
|
or, with a variant part,
type
record type identifier = record
field identifier: type definition;
...
field identifier: type definition;
case bar: variant type of
selector: (field declarations);
selector: (field declarations);
...
end;
|
or, without a variant selector field,
type
record type identifier = record
field identifier: type definition;
...
field identifier: type definition;
case variant type of
selector: (field declarations);
selector: (field declarations);
...
end;
|
The reserved word record defines a structure of fields.
Records can be `packed' to save memory usage at the expense of
speed.
The reserved word `record' and record types are defined in ISO-7185 Pascal. According to ISO Pascal, the variant type must be an identifier. GNU Pascal, like UCSD and Borland Pascal, also allows a subrange here.
A record field is accessed by record type variable . field identifier
See also: section 9.188 packed, section 8.1.7.4 case Statement.