Skip to content

get_keys

Syntax

get_keys(table_name)
get_keys(list_table_name)

Parameters

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

Returns

This action 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 action returns an empty list.

Description

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

Note

If the table contains a compound key (e.g., keys = list(1, 2)), an error will occur.
Currently, the `get_keys` function does not handle compound keys.

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