Creates an arbitrary number of instances of a tag according to a definition.
Each instance within the array can then be referenced and manipulated independently using a unique index number.
<index:array size=10 *= <box {This is box</n>number <index>.}> >
— Creates and presents 10 boxes on the screen, each containing predefined text with that box's number from 1 to 10.
The array tag's primary field specifies the index number of the current element within the array.
An array creates a specified number of presentation tags or persistent logic tags. All tags are created according to a common definition, but after creation each tag in the array can be accessed and manipulated using its numerical position (known as its array index) within the array.
Each tag within the array may be referred to as an array 'element'. The definition used to create array elements must be specified in the * field before the array tag is complete. Once it has been defined, this definition cannot be altered during the lifetime of the array tag instance. An array element definition must consist of exactly one tag, defined with any fields desired. The primary and secondary fields of that tag may themselves contain other tags as required.
The size field specifies the total number of elements in the array. Array elements are allocated index numbers from 1 up to and including the value of the size field. After the array tag is complete, the value in the size field can be changed at any time thereafter in order to resize the array. If the size value is reduced, excess elements at the end of the array are deleted. If the size value is increased, new elements are created at the end of the array according to the initial definition.
The array tag's primary field is used for getting or setting the current array index in order to access an individual element in the array, which can then be accessed using the * field.
In order to provide access to to the primary field of an array tag, an array tag should always be given a name. Take care to ensure the name chosen does not conflict with an existing tag or field of the same name within the same scope.