class Test { var value = { 123.2, 456.5 }; # conversion to int: routine (int) () { io.writeln( "casting to int" ); return value.sum(); } # conversion to float: routine (float) () { io.writeln( "casting to float" ); return value.sum(); } # conversion to string: routine (string) () { io.writeln( "casting to string" ) return value.reduce(""){ [x, y] y += (string)x }; # convert to string } routine (array) () { io.writeln( "casting to array" ); return array( %value ){ [i] value[i] } } routine (tuple) () { io.writeln( "casting to tuple" ); return (value[0], value[1]) } } var t = Test(); var a = (int)t; var b = (float)t; var c = (string)t; var v = (array)t; var v2 = (tuple)t; io.writeln( a, b, c, v2, std.about(v2) ) var e = Exception::Error( "testing" ); io.writeln( (string)e ); # a = (int)e; # error