<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Chuckists,<div><br></div><div>A question about arrays in Chuck: the manual briefly mentions "functions that have arrays as arguments or return type" but I can't seem to find an actual example of a function with an array as a return type.  Does anyone know if this works, or there is a way to make it work?</div><div><br></div><div>If I call the function below, for instance, I get a "NullPointerException: (array access)" when I do anything with the result:</div><div><br></div><div>fun float[] t(float x,float nn[]) {<br>    float rr[];<br>    for(0 => int n;n<nn.size();n++) {<br>        nn[n] + x => rr[n];<br>    }<br>    return rr;<br>}</div><div><br></div><div>Yours truly,</div><div>David</div><div><br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>-------------------------------------------------------------------</div><div>Dr. David Ogborn, Assistant Professor<br>Communication Studies & Multimedia</div><div>Director, Cybernetic Orchestra & ESP Studio</div><div>McMaster University, Hamilton, Canada<br><br>ogbornd --at-- <a href="http://mcmaster.ca">mcmaster.ca</a></div><div><div><a href="http://davidogborn.net/">http://davidogborn.net</a></div><div><a href="http://twitter.com/ogbornd">http://twitter.com/ogbornd</a></div><div><span class="Apple-style-span" style="font-size: medium; "><a href="http://esp.mcmaster.ca/">http://esp.mcmaster.ca</a> (Cybernetic Orchestra)</span></div></div><div>1-905-525-9140 ext 27603</div></div><div><br></div></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></body></html>