378
22 LABELS
22.5 Arrays
Defining arrays
■Array elements
When an array is defined, the number of elements, or the length of array, must be determined. For the range of the number of
elements, refer to the following.
Page 380 Range of the number of array elements
■Dimension number of multidimensional array
Up to three-dimensional array can be defined.
■Definition format
The following table lists definition format.
The range from the array start value to the array end value is the number of elements.
■Initial value
One initial value can be set for a single array definition. (Different initial values cannot be set for each element.)
The same initial value is stored in all the array elements.
Number of array
dimensions
Format Remarks
One dimension Array of primitive data type/structure name (array start value..array end value) • For the primitive data type:
Page 374 Primitive data
type
• For the structure name:
Page 381 Structures
[Definition example] Bit (0..15)
Two dimensions Array of primitive data type/structure name (array start value..array end value, array start value..array
end value)
[Definition example] Bit (0..1, 0..15)
Three dimensions Array of primitive data type/structure name (array start value..array end value, array start value..array
end value, array start value..array end value)
[Definition example] Bit (0..2, 0..1, 0..15)