dictionary
Creates a dictionary in Templex.
Syntax
dict = dictionary()
Input
N/A
Example
- Example 1
- Template:
{dict=dictionary(); dict[“one”]=1; dict[“two”]=2; dict[“three”]=3; dict[“one”]; cr(); dict[“two”]; cr(); dict[“three”]}
- Example 2
- Template:
{dict=dictionary(); dict[“one”]=”New”; dict[“two”]=”Dictionary”; dict[“one”]; cr(); dict[“two”];}
- Example 3
- Template:
{dict=dictionary(); dict[1]=”alpha”; dict[2]=”beta”;} The second letter in the Greek alphabet is {dict[2]}.
Comments
A Templex dictionary is a data type which behaves like an array.