Structures
A structure provides the ability to create a new data type composed of other data types arranged in a specified order.
Example:
In the example above, a structure named NEWSTRUCT is declared to contain two data types, a 16-bit
number and a 20-character array.
Note
A structure is declared in the DEFINE_TYPE section of the program.
Once declared, a structure may be used in the same way as any other data type. Here is a syntax sample:
Structures can be initialized using set notation as in the two examples below. Notice that the members of each structure as well as the entire array are enclosed in braces.
Structure members are referenced using dot-operator syntax as shown below:
A syntax sample for a structure definition is shown below:
Note
The attributes VOLATILE, PERSISTENT, and CONSTANT do not apply to the individual members of a structure.