chuck
chuck copied to clipboard
error when declaring an array of floats whose 1st element is an int
MacOS High Sierra 10.13.1 - ChucK 1.4.0.0
When declaring an array of floats the following way:
[1,2.] @=> float a[]; // same result using [1,2] - that has no floats at all in the array
I get the following error:
line(1): array init [...] contains incompatible types...
While declaring it this way instead is fine:
[1.,2] @=> float a[];
I think this has been a known issue for a really long time. Not sure whether it would be easy to fix. Most people just make sure that the first number is a float, I think...