ListKeys
| Description | Returns an array of all keys used within a dictionary. Use this to discover what is in a dictionary. |
| Returns | Array |
| Usage | Script Only. |
| Function Groups | Dictionary, Variable |
| Related to: | Dictionary | MetaData | DictionaryCopy | DictionaryRemove | GetNextKey |
Format: ![]() |
ListKeys( dictionary[, order, return value ]); |
| Parameters |
| Dictionary | ||||||||||||
| Required. The name of the dictionary. | ||||||||||||
| Order | ||||||||||||
An optional numeric expression. Defines the search according to the following table of values. Defaults to 0 if missing or invalid
|
| Return Value | ||||||||||||
Controls what is returned according to the following table. Defaults to 1.
|
Example:
(given a dictionary named X as shown)
R = ListKeys( X ); R == ["A", "B", "C"];
Example 2:
Given the code:
IF Watch(1);
[
X = Dictionary(0, 5);
X["A"] = 42;
X["B"] = 86;
X["C"] = 99;
Buf = ListKeys( X, 1, 3);
]
Buff will contain:
