Andrew;<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
[Rational_io.ck]:line(16): cannot declare static non-primitive objects (yet)...<br>
[Rational_io.ck]:line(16): ...(hint: declare as ref (@) &amp; initialize<br>
outside for now)<br>
<br></blockquote><div><br>Yeah, that&#39;s a bit tricky. Have a look at this;<br>//=========================<br>class war<br>    {<br>    //define array<br>    static float  foo[];<br>    <br>    //fill it and return it<br>
    fun static float[] bar()<br>        {<br>        for (int n; n&lt; foo.cap(); n++) n =&gt; foo[n];<br>        <br>        return foo;<br>        }<br>    }<br>    <br> //initiate the array outside of the class<br> new float[10] @=&gt; war.foo;<br>
 <br>// test, should print &quot;3.0000&quot;<br>&lt;&lt;&lt; war.bar()[3] &gt;&gt;&gt;; <br></div></div>//========================<br><br>With arrays of primitives the syntax somehow becomes a bit differently from the more regular<br>
<br>static Event @ my_event;<br><br>...and we have to define them as normal except not set the length, the length will be set at initiation, which seems somewhat logical considering the nature of the issue but it took me a while to figure it out as well.<br>
<br>We might consider having some examples in the /examples/ dir to illustrate this kind of thing as it leads to a lot of questions.<br><br>yours,<br>Kas.<br>