[XeTeX] Fwd: [texhax] Strange \loop-behaviour

Vafa Khalighi vafa at users.berlios.de
Tue Jun 2 06:13:51 CEST 2009


---------- Forwarded message ----------
From: Reiner Durchholz <r.durchholz at online.de>
Date: Tue, Jun 2, 2009 at 4:37 AM
Subject: [texhax] Strange \loop-behaviour
To: texhax at tug.org


This is a report of what I believe is a flaw in the "\loop" implementation.The
appended source text behaves differently with and without the \null-command.
Instead of \null, almost any other command can be used.
The flaw came to my attention when I first used a \showthe for error
analysis.

The used system is OS X 10.5.5.
The TeX system is TeXShop V2.26 with  XeTeXk, Version 3.1415926-2.2-0.999.6
(Web2C 7.5.7)

%!TEX TS-program = xetex
%!TEX encoding = UTF-8 Unicode
\parindent=0cm
% ______________________________________________________
\openin1=TestObject
\newcount\more \more=1 % used as boolean, set to "true"
% -----------------------------------------
\loop
\read 1 to \InputLine
\ifeof1\more=0\fi
\null % without this command, the loop either does not end or ends
immediately
\number\more
\ifnum\more=1
 -- \InputLine\ +++ \hfil\break
\repeat
% -----------------------------------------
\closein1
\bye



 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- -- -- --
-- - -- -- -- -- -- -- --
  Dr. Reiner Durchholz
 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- -- -- --
-- - -- -- -- -- -- -- --






_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: postmaster at tug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20090602/2647a8ae/attachment.html>


More information about the XeTeX mailing list