The function get_keys_bool_map retrieves the index values of all elements in a MAP and stores them in an array. The index values are stored in the array in random order.
get_keys_bool_map ( input_map;result_array )
This function returns a NUMBER, which is the number of elements stored in the array.
This function has two parameters:
Example
MAP BOOL input_map
ASSIGN input_map ["first"] := TRUE
ASSIGN input_map ["second"] := FALSE
ASSIGN input_map ["third"] := TRUE
ASSIGN input_map ["fourth"] := TRUE
ASSIGN input_map ["fifth"] := FALSE
ARRAY TEXT result_array[1]
NUMBER number_of_elements
ASSIGN number_of_elements := get_keys_bool_map (input_map;result_array)
NUMBER counter
FOR counter
FROM 1
UPTO number_of_elements
DO
#
The key @(result_array[counter]) contains @(input_map[result_array[counter]]) in the map.
#
OD