get_keys()

Returns a list of keys from a table or list-table.

Synopsis

get_keys(table_name)
get_keys(list_table_name)

Description

This function returns the list of keys store in the indicated table or list-table.

Parameters

table_name

The name of a table variable or list-table variable.

Returns

This function returns the list of keys store in the indicated table or list-table. The keys are sorted in ascending order.

If the table or list-table is empty, the function returns an empty list.

Examples

The following example sets the key_list to (10, 20, 30)

variables {
        table some_table
    }
    clear(some_table)
    some_table[40] = 1
    some_table[30] = 2
    some_table[10] = 3
    some_table[20] = 4
    erase(some_table,40)
    key_list = get_keys(some_table)

See Also

clear(), erase(), get_values()