Rice Lake iRite IDE User Manual
Page 21
RECORD
END
RECORD
field-declaration-list
920i
Programming Reference - Language Syntax
17
To be the best by every measure
Figure 3-5. Record Type Definition Syntax
Examples:
type MyRecord is
record
A : integer;
B : real;
end record;
The EmployeeRecord record type definition, below, incorporates two enumeration type definitions, tDepartment
and tEmptype:
type tDepartment is (Shipping, Sales, Engineering, Management);
type tEmptype is (Hourly, Salaried);
type EmployeeRecord is
record
ID : integer;
Last : string;
First : string;
Dept : tDepartment;
EmployeeType : tEmptype;
end record;
Database Type Definitions
A database type definition describes a database structure, including an alias used to reference the database.
<database-type-definition>:
database (STRING_CONSTANT)
<field-declaration-list>
end database
;
<field-declaration-list>:
<field-declaration>
| <field declaration-list>
<field declaration>
;
<field-declaration>:
IDENTIFIER ':' <type> ';'
;
DATABASE
END
DATABASE
field-declaration-list
STRING-CONSTANT
(
)
Figure 3-6. Database Type Definition Syntax
Example:
A database consisting of two fields, an integer field and a real number, could be defined as follows:
type MyDB is
database ("DBALIAS")