<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>function foo(...)<br></div><div>local x, y<br></div>begin<br> :<br></div> x = ...<br></div> y = ...<br></div> return( [/x, y/] ) ; return as variable of type 'list'<br></div>end<br><br> ....<br> ...<br></div> ab = foo(...)<br></div><div> print(ab) ; look at output<br><br></div> a = ab[0] ; clarity<br></div> b = ab[1]<br></div> delete(ab)<br><br>====<br></div>Note: you could use 'ab[0]' and 'ab[1]' but I find it clearer to explicitly extract each variable<br><br></div>Good Luck<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 30, 2016 at 9:01 PM, Sitan Heyl <span dir="ltr"><<a href="mailto:heylsitan@gmail.com" target="_blank">heylsitan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, All<div> I am writing an function file defined by myself, I need return two arrays, does anyone know how the function return two arrays?</div><div><br></div><div>Best,</div><div>Yongli</div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>