length_number_array

The length_number_array function calculates the length of an array of type NUMBER. The length of an array is either the array length in the initial declaration of the array or, if the array has more elements than specified in the initial declaration, the length is the actual number of elements in the array.

 length_number_array ( input_array )

The result of this function is of type NUMBER and is the number of elements in input_array.

The function has one parameter:

  • input_array, type NUMBER. This is the array with length to be determined.

An example is provided here.

ARRAY NUMBER test_array [1]  

ASSIGN test_array [1] := 12
ASSIGN test_array [2] := 38
ASSIGN test_array [3] := 60
ASSIGN test_array [4] := 77
ASSIGN test_array [5] := 91
NUMBER function_result  

ASSIGN function_result := length_number_array (test_array) 

#
@(function_result)
#

If you refer to an array element of an array that is filled beyond its initial length, it results in the creation of that element. The element is created with a default value: 0 for NUMBER, "" for TEXT, and FALSE for BOOL. For example, the test IF testing[1] THEN FI will result in the creation of element 1 in array testing.