In logic, an
Array is an object that contains a collection of elements of the same type, either numeric, alphanumeric, or string. An array can be of many dimensions, though each of these dimensions is of a fixed size. Arrays can be used in various processing operations, including defining a list of constant values (like month names) or working with hotdecks and
DeckArrays.
Whenever an Array object is used in the application, a value or numeric expression for each dimension must be given. The initial array contents are zero (if numeric) and blank (if alphanumeric or string) until a value for each dimension is assigned. If using a numeric
saved array, the initial array contents are
default.
If you want the behavior of an array but without fixed dimensions, you can use the
HashMap object, which is an associative array.
An Array is a CSPro logic object and the following functions can be called via
dot notation:
Function | Description |
clear | Resets all array values to the default value. |
length | Returns the size of an array dimension. |
|
getLabel | Returns the symbol's label. |
getName | Returns the symbol's name. |
getJson | Returns the symbol's metadata and value represented in JSON. |
getValueJson | Returns the symbol's value represented in JSON. |
updateValueFromJson | Modifies the symbol based on a JSON representation of the value. |