<font color="#000066"><font><font face="verdana,sans-serif">Thanks, that's exactly what I did. Regs, Prakash.<br></font></font></font><br><div class="gmail_quote">On Mon, Dec 12, 2011 at 8:04 PM, Geordie McBain <span dir="ltr"><<a href="mailto:gdmcbain@freeshell.org">gdmcbain@freeshell.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2011/12/13 Prakash Manandhar <<a href="mailto:jsaaymi@gmail.com">jsaaymi@gmail.com</a>>:<br>
<div><div class="h5">> I am a newbie. Say I have the following:<br>
><br>
> h = 0.1;<br>
> out[] = Extrude {h,0,0} {<br>
> Surface{1, 5, 14, 10}; Layers{10 }; Recombine;<br>
> };<br>
><br>
> How do I get the length of the out array.<br>
<br>
</div></div>I don't know a nice way, but here's what I do:<br>
<br>
%<---<br>
Point(1) = {0, 0, 0};<br>
out[] = Extrude {1, 0, 0} { Point{1};};<br>
For i In {0:2}<br>
Printf ("out[%g] = %g", i, out[i]);<br>
EndFor<br>
--->%<br>
<br>
The message console then ends with:<br>
<br>
%<---<br>
out[0] = 2<br>
out[1] = 1<br>
Error : 'count.geo', line 4 : Uninitialized variable 'out[2]'<br>
out[2] = 0<br>
Info : Done reading 'count.geo'<br>
--->%<br>
<br>
which tells me that the length is two. Then I go back and rewrite the<br>
program knowing that. This is only any good if the length is going to<br>
be the same each time.<br>
</blockquote></div><br>