How to use array of values in the PROMOTIC system
. The array is used in a different way in each language.
This chapter describes the usage of arrays in both languages.
The array in this language is represented by the PmArray
object. This object is optimized for PROMOTIC system usage and allows to use 1- and 2-dimensional array.
object can be created by the Pm.CreatePmArray
The array in this language is a standard VBScript
array, i.e. Array
The VBScript array functions can be used in order to work with this array.
The array can be created by the Array
method (for 1-dimensional array), or by means of the Dim
statement (also for multi-dimensional arrays).
(Col,Row) - 2-dimensional array meaning an array of rows
When working with 2-dimensional arrays, the user defines the meaning of the 1st and the 2nd dimension.
In the PROMOTIC functions that receive or return an array of rows, the meaning of the dimensions is always in the order(Col,Row) i.e (Column, Row). This means that the first index represents the number or the count of columns and the second index represents the number or count of rows. This approach is handy because the whole rows can be added, deleted or modified easily, because the individual items of each row are stored in a sequential memory area.
Some other PROMOTIC methods using arrays
- Returns a string created by merging the substrings contained in 1-dimensional array
- Storing the variable (or the array of variables) into the text file
- Returns the list of object viewers according to selected criteria
- Returns the list of all national languages supported by the application