[chuck-users] Problem with mixed float int lists

Hans Aberg haberg at math.su.se
Wed Dec 9 16:52:36 EST 2009


The rule that 'chuck' seems to use on explicit lists is to look at the  
first entry. If that number is without a decimal point, the list is of  
type int[], if has one, it is float[].

It would be easy to fix: look at all entries, and set it to int[]  
exactly when all numbers are without a decimal point.

One then still has to write separate function arguments of types  
float[] and int[]. A second rule might be that if an function argument  
of type int[] isn't defined in function argument overloading, passing  
an int[] list to an argument of type float[] will convert it.

   Hans




More information about the chuck-users mailing list