length_number_map

The length_number_map function yields the number of elements contained in a NUMBER MAP.

 length_number_map ( MAP_to_be_counted)

The function returns a NUMBER, which is the number of elements stored in the map.

This function has one parameter:

  • MAP_to_be_counted, MAP of type NUMBER. A MAP whose number of elements is to be counted.

An example is provided here.

MAP NUMBER test_map 

ASSIGN test_map ["first"] := 12345
ASSIGN test_map ["second"] := 67890
ASSIGN test_map ["third"] := 9876
ASSIGN test_map ["fourth"] := 54321
ASSIGN test_map ["fifth"] := 65748
NUMBER length_function_result 

ASSIGN length_function_result := length_number_map (test_map) 

#
@(length_function_result)
#

If you refer to an MAP element, 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 MAP testing.