Dynamic types and access

A variable is of a dynamic type if the EGL runtime code resolves access to the variable by name. In practice, you are performing dynamic access when you refer to any of the following fields:
Here are examples of the last case:
myCustomer["customerName"]

Access to expressions that use dot syntax (such as myRecord.myField) can be dynamic. The following rule dictates the behavior: If the leftmost part of a field-access expression (a series of names separated by dots) is a dynamic type, or another expression whose type is Any, EGL uses dynamic access on any fields that follow.

Example

The following example shows various methods of dynamic access:
// Define a Dictionary named point
point Dictionary{x=1, y=1};

// Access value at key "x" of point
anInt = point["x"];

// Access point using normal data access syntax
anInt = point.x ;

// Access X using variable with value "x"
str String = "x";
anInt = point[ str ];