ArrayToDictionary
(System Library)
Description: | Returns a dictionary if given an array of key names and a matching array of values. |
Returns: | Dictionary |
Usage: | Script Only. |
Function Groups: | Array, Dictionary |
Related to: | Dictionary |
Format: | System.ArrayToDictionary(KeyArray, Values) |
Parameters: |
KeyArray |
A one-dimensional array of key names for the dictionary. |
Values |
A single value or a one-dimensional array of values matching the names in KeyArray. |
Comments: |
This module is a member of the System Library, and must therefore be prefaced by \System. as shown in the "Format" section. If your application predates version 11.2, use the backslash notation rather than dot: \System\ |
Examples:
D = System.ArrayToDictionary(MakeArray("a", "b"), TRUE)
is the same as
D = Dictionary(); D["a"] = TRUE; D["b"] = TRUE;
D = ArrayToDictionary(MakeArray("a", "b"), MakeArray(Invalid, 123))
is the same as
D = Dictionary() D["a"] = Invalid; D["b"] = 123;