Each property/value entry is syntactically equivalent to a key/value
entry, as shown in the following example. The entries can be in any
order:
myRef Dictionary
{
// properties
caseSensitive = no,
ordering = none,
// key/value pairs
ID = 5,
lastName = "Twain",
firstName = "Mark",
age = 30
};
Your code can neither add nor retrieve a property or its value.
The following properties are available:
- caseSensitive
- Indicates whether case affects key access. The following options
are available:
- NO (the default)
- The case of the key does not affect key access. The following
statements are equivalent:
age = row.age;
age = row.AGE;
age = row["aGe"];
- YES
- The following statements can have different results, even though
EGL is primarily a case-insensitive language:
age = row.age;
age = row.AGE;
age = row["aGe"];
The value of the caseSensitive property
affects the behavior of several of the functions described in Dictionary functions.
- ordering
- Determines the order of the keys that you retrieve. The value
of this property affects the behavior of the functions getKeys() and getValues().
For more information, seeDictionary functions.
The value of the property does not affect the way the dictionary stores
the keys (always in the order you entered them), but the order in
which you can retrieve them.
- Use the OrderingKind enumeration to
specify values for this property. The OrderingKind enumeration
has the following values:
- none (the default)
- Your code cannot rely on the order of key/value entries. When
you call the getKeys() function, the order
of keys might not match the order of values when you call the getValues() function.
- byInsertion
- getKeys() returns keys and getValues() returns
values in the order you inserted them. Any entries in the declaration
are considered to be inserted first, in left-to-right order.
- byKey
- getKeys() returns keys and getValues() returns
values in key order. (See "Compatibility" later in this topic.)
When you declare a dictionary variable in your program,
you can include any of the EGL field level properties (see
Field-level properties). If you use any of these
properties, which are not specific to the Dictionary part, you must
precede the property declaration with an
@ operator, and use
the appropriate syntax. For more information, see
@ operator.