HP Pascal/iX Reference Manual (31502-90022)

3- 18
A
record
is a structured type consisting of a collection of components
that are not necessarily of the same type. Each component is termed a
field
of the record and has its own identifier. A field of a record is
accessed by using the appropriate
field selector
.
A record type consists of the reserved word RECORD, a field list, and the
reserved word END. The reserved word PACKED may precede the reserved word
RECORD. If PACKED is used, it instructs the compiler to optimize storage
of the record fields.
Syntax
Record_type:
Field List
The
field list
has an optional
fixed
part and an optional
variant
part.
The field list may have any number of fields, and each field is given a
unique name called a
field identifier
.
Syntax
Field_list:
Fixed Part
In the
fixed part
of the field list, a field definition consists of an
identifier
, a
colon
(:), and a
type
. Any simple, structured, or pointer
type is legal. Several fields of the same type may be defined by listing
the identifiers separated by commas.
Syntax
Fixed_part: