<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi</div><div><br></div><div>Yes it's legal. However the runtime behaviour depends on how clever the compiler is.</div><div>The book "Programming in Oberon" says</div><div>"The for statement has the advantage of guaranteed termination."</div><div>So for example a stupid compiler translates the following code into a program that runs forever:</div><div> FOR i := 1 TO 2 DO DEC(i) END.</div><div><br></div><div>A more clever compiler translates</div><div> FOR i := m TO n-1 DO (* some processing *) END;</div><div>into</div><div> temp := m;</div><div> WHILE temp < n DO i:= temp; (* some processing *) INC(temp) END;</div><div><br></div><div>Jörg</div><div><br></div><div><br>On 16.02.2013, at 14:49, <<a href="mailto:Aubrey.McIntosh@Alumni.UTexas.Net">Aubrey.McIntosh@Alumni.UTexas.Net</a>> wrote:<br><br></div><blockquote type="cite"><div>Is this legal?<div><br clear="all"><div><div><span class="Apple-tab-span" style="white-space:pre">                </span>FOR ix := 0 TO 2 DO</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>INC( ix )</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>END;</div>
</div><div><br></div>-- <br><font face="'times new roman', serif">Aubrey McIntosh, Ph.D.<br>211 E. 5th St.<br>Morris MN 56267</font><div><div><span style="line-height:20px;background-color:rgb(255,255,255)"><font face="'times new roman', serif">(512)-348-7401</font></span></div>
</div><div><div><br></div></div>
</div>
</div></blockquote><blockquote type="cite"><div><span>--</span><br><span><a href="mailto:Oberon@lists.inf.ethz.ch">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems</span><br><span><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a></span><br></div></blockquote></body></html>