Chapter 3. Program Data34 PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual GFK-2950C3.1.4 ArraysAn array is a complex data type composed of a series of variable elements with identical data types.Any variable can become an array, except for another array, a variable element, or a UDFB. InMachine Edition, you can create single-dimensional arrays and two-dimensional arrays.In the controller CPU, each element of an array is treated as a separate variable with a separate,read-only reference address. The root node of the array variable also has a reference address that iseditable. When you set or change the reference address of the root node of an array variable, thereference addresses of its elements are filled in with a range of addresses starting at that referenceaddress and incremented for each element so as to create contiguous non-overlapping memory.3.1.5 Variable Indexes and ArraysPACSystems CPUs with firmware version 6.00 or later support variable indexes for arrays. With avariable index, when logic is executed, the value of the variable is evaluated and the correspondingarray element is accessed.Note: The numbering of array elements is zero-based.For example, to access an element of the array named ABC, you could write ABC[DEF] in logic. Whenlogic is executed, if the value of DEF is 5, then ABC[DEF] is equivalent to ABC[5], and the sixthelement of array ABC is accessed.If the value of the variable index exceeds the array boundary, a non-fatal fault is logged to the CPUfault table. In LD, the instruction for which this occurred does not pass power to the right.Requirements and SupportAn index variable must be of the INT, UINT, or DINT data type.The valid range of values for an index variable is 0 through Y, where Y = [the number of arrayelements in the array] - 1. Refer to Ensuring that a Variable Index does not Exceed the UpperBoundary of an Array.An index variable can be one of the following:▪ Symbolic variable▪ I/O variable▪ Variable mapped to % memory areas such as %R▪ Structure element▪ Array element with a constant index▪ Array element with a variable index▪ Alias variable▪ In the logic of a UDFB or parameterized block: formal parameterThe following support a variable index:▪ Array elements of any data type except STRING▪ Parameter array elements of any data type▪ Alias variables