<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Reiner Durchholz</b> <span dir="ltr">&lt;<a href="mailto:r.durchholz@online.de">r.durchholz@online.de</a>&gt;</span><br>
Date: Tue, Jun 2, 2009 at 4:37 AM<br>Subject: [texhax] Strange \loop-behaviour<br>To: <a href="mailto:texhax@tug.org">texhax@tug.org</a><br><br><br><div style=""><div>This is a report of what I believe is a flaw in the &quot;\loop&quot; implementation.<div>
The appended source text behaves differently with and without the \null-command.</div><div>Instead of \null, almost any other command can be used.</div><div>The flaw came to my attention when I first used a \showthe for error analysis.</div>
<div><br></div><div>The used system is OS X 10.5.5.</div><div>The TeX system is TeXShop V2.26 with <font color="#000000"><span style="background-color: transparent;"> XeTeXk, Version 3.1415926-2.2-0.999.6 (Web2C 7.5.7)</span></font></div>
<div><div><br></div><div><div><div><div>%!TEX TS-program = xetex</div><div>%!TEX encoding = UTF-8 Unicode</div><div>\parindent=0cm </div><div>% ______________________________________________________</div><div>\openin1=TestObject </div>
<div>\newcount\more \more=1 % used as boolean, set to &quot;true&quot;                </div><div>% -----------------------------------------</div><div>\loop</div><div>\read 1 to \InputLine  </div><div>\ifeof1\more=0\fi</div>
<div>\null % without this command, the loop either does not end or ends immediately </div><div>\number\more</div><div>\ifnum\more=1</div><div> -- \InputLine\ +++ \hfil\break</div><div>\repeat</div><div>% -----------------------------------------</div>
<div>\closein1</div><div>\bye</div><div><br></div></div></div></div></div></div><br><br><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<div><div> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- -- -- -- -- - -- -- -- -- -- -- --</div><div>  Dr. Reiner Durchholz</div><div> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- -- -- -- -- - -- -- -- -- -- -- --</div>
<div><div><div><br></div></div></div><div><br></div><br><br></div></div></span> </div><br></div><br>_______________________________________________<br>
TeX FAQ: <a href="http://www.tex.ac.uk/faq" target="_blank">http://www.tex.ac.uk/faq</a><br>
Mailing list archives: <a href="http://tug.org/pipermail/texhax/" target="_blank">http://tug.org/pipermail/texhax/</a><br>
More links: <a href="http://tug.org/begin.html" target="_blank">http://tug.org/begin.html</a><br>
<br>
Automated subscription management: <a href="http://tug.org/mailman/listinfo/texhax" target="_blank">http://tug.org/mailman/listinfo/texhax</a><br>
Human mailing list managers: <a href="mailto:postmaster@tug.org">postmaster@tug.org</a><br></div><br></div>