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

David M. Jones dmj at ams.org
Tue Jun 2 14:31:15 CEST 2009


Try

    \ifeof1\more=0 \fi

When reading an integer, TeX continues scanning forward until it finds
a non-digit token.  What you've written leads to the equivalent of

    \more=0\number\more

instead of

    \more=0 \number\more

David.

> Date: Tue, 2 Jun 2009 14:13:51 +1000
> From: Vafa Khalighi <vafa at users.berlios.de>
> Reply-To: Unicode-based TeX for Mac OS X and other platforms <xetex at tug.org>
> 
> ---------- 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
> 
> 
> -- 
> BEGIN-ANTISPAM-VOTING-LINKS
> ------------------------------------------------------
> 
> Teach CanIt if this mail (ID 19973656) is spam:
> Spam:        https://canit.ams.org/canit/b.php?i=19973656&m=d9c63cd1694c&c=s
> Not spam:    https://canit.ams.org/canit/b.php?i=19973656&m=d9c63cd1694c&c=n
> Forget vote: https://canit.ams.org/canit/b.php?i=19973656&m=d9c63cd1694c&c=f
> ------------------------------------------------------
> END-ANTISPAM-VOTING-LINKS
> 


More information about the XeTeX mailing list