1-53
Section 1 Specifications
<Array of structures>
Structures may be contained in an array.
<Sample data type definition>
The example shown below defines an array of 10 machines, indexed from 1 to 10, which are defined in the above example.
<Sample variable declaration>
The data type of variable “num_hole_pro” is machine_1_10.
<Access method>
Structures in an array are accessed in the form of <variable name>[<array index>].<member name>. Examples of <member
name> in the above example are X_POS, Y_POS, DEPTH, RPM, and FLAG. For example, in order to access the 5th row (RPM)
of num_hole_pro, “num_hole_pro[5].RPM” is specified.
<Structure of arrays>
Array is defined as an element of a structure.
<Sample data type definition>
The example shown below defines a structure “machine2” of which the “DEPTH” member is an array of depths. of depths.
<Sample variable declaration>
The data type of variable “hole_pro_02” is machine2.
<Access method>
An array in a structure is accessed in the form of <variable name>.<member name>[<array index>]. To access the 5th depth
in the member “DEPTH” of “hole_pro_02,” you specify hole_pro_02.DEPTH[5].