Dear Gmsh developers,<br><br><br>I am trying to use Gmsh's "For" loop with a variable incrementation step, however I am not obtaining the expected results.<br><br>For example, I expected  the following Gmsh commands<br>
<br>step = 1.0;<br>For k In {0:100:step}<br>Printf("step = %f   k = %f", step, k ) >> "test.txt";<br>step = step +1;<br>EndFor<br><br><br>would produce an output file called "test.txt"  containing the following data:<br>
<br>step = 1.000000   k = 0.000000<br>step = 2.000000   k = 2.000000<br>step = 3.000000   k = 5.000000<br>.<br>.<br>.<br>and so on.<br><br><br>However, the previous commands result in the following output file:<br><br>step = 1.000000   k = 0.000000<br>
step = 2.000000   k = 1.000000<br>step = 3.000000   k = 2.000000<br>step = 4.000000   k = 3.000000<br>step = 5.000000   k = 4.000000<br>.<br>.<br>. <br>and so on.<br><br><br>It seems that incrementation of  the "step" variable inside the loop does not result in a variable update of "k", which keeps growing with unit steps.<br>
<br>I found this strange behaviour while trying to emulate  a "While" loop , which doesn't appear to be promptly available in Gmsh (by setting a "step" variable bigger than the "for" loop's range,  when some break condition is <span class="ital-inline">satisfied </span>).<br>
<br><br>Am I missing something and these are in fact the expected behaviours, or would this be a bug of some sort?<br>Is there a better way to work these issues around (emulating a "While" loop) ?<br><br><br><br>
yours faithfully,<br>Lucas Blattner Martinho<br><span class="fplc"><strong></strong></span><br><br><br><br>