I would like to create a function that fills an array (that is passed to the function). I tried<br><br>def fillarray (expr x) =<br> for n=1 upto 10:<br> x[n]:=n;<br> endfor;<br>enddef;<br><br>numeric x[];<br><br>
but when I tried calling the function with<br><br>fillarray(x);<br><br>or with<br><br>fillarray(x[]);<br><br>I get error(s). Can a function be defined in MetaPost to fill an array?<br><br>Thanks,<br><br>Troy Henderson<br>