Developing Apama Applications > EPL Reference > Lexical Elements > Literals > Dictionary literals
Dictionary literals
A dictionary literal can contain one or more pairs of key/item values.
The first expression in a dictionary literal entry is the key value and the second expression is the item value. In a dictionary literal, all key values must be the same type and all item values must the same type. Both must be of a type that matches the types specified in the dictionary variable’s definition.
A dictionary literal must contain at least one key/item pair except when the dictionary literal is in an initializer. For example, the following statement is valid:
myDictionary := {};
The following statement is not valid:
takesADictionaryArgument({});
Example:
{1:"One", 2:"Two", 3:"Three"}
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.