[texhax] an unexpected loop

Donald Arseneau asnd at triumf.ca
Wed Sep 19 22:59:07 CEST 2007

"Randy Schilling" <RChilling at comcast.net> writes:

> Dear Sir,
> In the code that follows \zzn is a count register,
> \irrrdgts is macro containing 0 or 1,
> and \vrz{0pt} is just a phantom character, a line of width 0.
> The code is part of a \newif construction used with \loop...\repeat.
> I apologize if I haven't  provided enough code to show the problem.
> \zzn=\irrrdgts\vrz{0pt}\ifcase\zzn\rlnfalse\else\rlntrue\fi
> It works with the phantom  but without the phantom,
> and this is what I don.'t undersatand,  its goes into
> an infinite loop.

You expand \ifcase while parsing the number to be assigned to \zzn,
thus before the assignment is actually made.

Use \relax or a space instead of a "phantom character" to terminate
an explicit number.

Donald Arseneau                          asnd at triumf.ca

More information about the texhax mailing list