DIM Function

Creates, resizes, or determines the size of an array. If a parameter is specified, the array is resized or created. The new size is returned.

Category: Array
Returned data type: Integer

Syntax

arrayName.DIM<(newsize)>

Required Argument

arrayName

is the name of the array that you declared earlier in the process.

Optional Argument

newsize

is the optional numeric size (dimension) of the array. This can be specified as a numeric constant, field name, or expression.

Details

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:
  • String
  • Integer
  • Date
  • Boolean
  • Real

Example

// 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
re = string_list.dim() // outputs 10