length_bool_array

The length_bool_array function calculates the length of an array of type BOOL. 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_bool_array ( input_array )

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

The function has one parameter:

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

An example is provided here.

ARRAY BOOL test_array [1] 
ASSIGN test_array [1] := TRUE
ASSIGN test_array [2] := FALSE
ASSIGN test_array [3] := TRUE
ASSIGN test_array [4] := TRUE
ASSIGN test_array [5] := FALSE

NUMBER function_result 

ASSIGN function_result := length_bool_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.