RECORD Examples
Example 1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The above example defines a record that is 76 bytes in length. It may be referenced as a group in any statement where a list is valid.
Example 2:
|
|
|
|
The above statement changes the value of the ADDR field in the REC1 record.
Example 3:
|
|
|
|
The above statement generates an array of records, each formatted like REC1.
Example 4:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The above statement would define a record prototype exactly like REC1 butit would not define any data. It could only generate additional RECORD statements.
Example 5:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The above example shows nested records and how various fields would be accessed.
Example 6:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The above examples shows the use of the LIKEPTR clause. The sixth line defines ORGPTR that is a record of all pointer variables based on the ORG record template. The eighth line creates an array of three such records.
![]() |