The as operator casts a value of one EGL type to another type. The most common use for the as operator is in conjunction with objects that Java™ returns through the ExternalType syntax. This access is strictly static; therefore, you need to cast objects to types that you have defined to EGL. For more information, see "ExternalType part."
The operator is also useful in dealing with ANY type variables.

null as "java:java.lang.Integer"
myVar as "objID:java"
javaLib.store("storeId" as "objID:java", "myId" as "objID:java",
"myMethod", myVar as "java:smallfloat");
These foreign language casts are available only with EGL's Java access functions (see Java access functions). These are older functions that EGL maintains for compatibility with earlier versions. For new code, use the more powerful ExternalType syntax.
In the following example, the default primitive type for a dictionary value is ANY. You cannot use the ANY type in a numeric expression, so you must cast the values as numeric types.
aDict Dictionary{ a = 1, b = 4 };
result int;
result = (aDict.a as INT) + (aDict.b as INT);
If you try to cast a value that is not appropriate to the target type, EGL throws a TypeCastException.