
Could std.abs detect if the variables are ints, and return an int if so? 3 => int intfoo; 2 => int intbar; std.abs(intfoo-intbar) => int foobar; result: [foo.ck]:line(3): cannot resolve operator '=>' on types 'float' and 'int'... It's not a big deal to add the $int, but it surprised me when I first encountered it. Cheers, - Graham

Hi Graham and all! As you may have seen on the main 'chuck' list, 1.2.0.3 is released and we have hopefully resolved this issue. std.abs is for int std.fabs is for float Sorry for the API changes. Also, sorry for the mountain of spam you are about to receive... Best, Ge! On Oct 19, 2005, at 8:47 PM, Graham Percival wrote:
Could std.abs detect if the variables are ints, and return an int if so?
3 => int intfoo; 2 => int intbar; std.abs(intfoo-intbar) => int foobar;
result: [foo.ck]:line(3): cannot resolve operator '=>' on types 'float' and 'int'...
It's not a big deal to add the $int, but it surprised me when I first encountered it.
Cheers, - Graham
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (2)
-
Ge Wang
-
Graham Percival