Sfairadora

  • Reference Guide

Union

Union(Type, ...)
Type1 | Type2
Creates a data type of the union category from the list of permitted types. Alternatively, the type can be constructed with repeated use of the | operator.
Example:
var String|Int str_int = 5;
...
str_int = "Abc";
...
if(type(str_int)==String)
...

See Also