The EGL Any type is a reference type that lets you create a variable whose data type is not fixed. The EDT implementation of Any is EAny.
eglx.lang
myInt INT = 42; myAny ANY = myInt; myInt = myAny as INT + 38;
/*********************************************************************
* The supertype of all other types; can reference any type of value. *
*********************************************************************/
externalType EAny type ClassType
/* {@Operation ==} compares two values of type any. */
static function $EQ(lvalue EAny in, rvalue EAny in)
returns(EBoolean) {@Operation{"=="}};
/* {@Operation !=} compares two values of type any. */
static function $NEQ(lvalue EAny in, rvalue EAny in)
returns(EBoolean) {@Operation{"!="}};
/* {@Operation widen} Converts to an any,
* as used in a boxing conversion */
static function asAny(value EAny in)
returns(EAny) {@Operation{"widen"}};
end
| Target | Issue |
|---|---|
| Java | No issues. |
| JavaScript | No issues. |