[Rational_io.ck]:line(16): cannot declare static non-primitive objects (yet)...
[Rational_io.ck]:line(16): ...(hint: declare as ref (@) & initialize
outside for now)
Yeah, that's a bit tricky. Have a look at this;
//=========================
class war
{
//define array
static float foo[];
//fill it and return it
fun static float[] bar()
{
for (int n; n< foo.cap(); n++) n => foo[n];
return foo;
}
}
//initiate the array outside of the class
new float[10] @=> war.foo;
// test, should print "3.0000"
<<< war.bar()[3] >>>;
//========================