Creates, resizes, or determines the size of an array. If a parameter is specified, the array is resized/created. The new size is returned.
Category: | Array |
Returned data type: | Integer |
arrayName.DIM<(newsize)>
arrayName
is the name of the array that you declared earlier in the process.
newsize
is the optional numeric size (dimension) of the array. This can be specified as a numeric constant, field name, or expression.
The DIM function is used to size and resize the array. It creates, resizes, or determines the size of the array. If a parameter is specified, the array is created or resized. The supported array types include:
// declare the string array
string array string_list
// Set the dimension of the String_List array to a size of 5
rc = string_list.dim(5) // outputs 5
// <omitted code to perform some actions on the array>
// Re-size the array size to 10
rc = string_list.dim(10) // outputs 10
// Query the current size
rc = string_list.dim() // outputs 10