Values of simple reference types

Values of type Any

Values of type Dictionary

// initializes a dictionary with 3 key/value pairs. // By default, the keys are case insensitive.
myRef Dictionary{
driverID =5,
lastName ="Twain",
firstName ="Mark"};// adds new key/value pairs to the dictionary
myRef.age=30;
myRef["Credit"]=700;// overrides an existing key/value pair
myRef.lastname="Clemens";// declare a dictionary that is case sensitive and stores // values in the order they are added to the dictionary
myOtherRef Dictionary=newDictionary(true/*caseSensitive*/, OrderingKind.byInsertion);

Values of type List

// declares a new list, disallowing nulls.
vals Int[];// declares a new list, allowing nulls.
nullVals Int?[];// declares a new list, adds 30 elements, and initializes each element to zero.
newVals Int[]=new Int[30];// declares a list of 2 strings by use of a set-values block
departurePhrase STRING[]=["goodbye", "ciao"];// assigns the first index in the array to "au revoir"
departurePhrase[1]="au revoir";// assigns the last index in the list to "auf wiedersehen".
departurePhrase[departurePhrase.getSize()]="auf wiedersehen";// initializes a list of 3 integers
integerList INT[]=[1,2,3];// initializes a list of 2 booleans
booleanList BOOLEAN[]=[(10000>50000), (10000<50000)];//initializes a 2-dimensional list; that is, a list of lists
the2Dimension INT[][]=[[1,2],[3,4]];// creates a value in which the element values are changeable, // but the name MINIMUMNUMBERS cannot refer to another list.const MINIMUMNUMBERS INT[]=[1,2,3,4,5];// declares another list of strings.
cities String[];// appends a new value to the end of the list.
cities.appendElement("Delta");// appends two new values to the end of the list.
cities.appendAll(["Denver", "Pueblo"]);// removes the second value in the list.
cities.removeElement(2);// removes all values from the list.
cities.removeAll();