On Thursday 11 December 2008 08:10:38 am Ulrike Fischer wrote:
> Am Thu, 11 Dec 2008 07:21:56 -0700 schrieb Bart C. Wise:
> > If I change the loop to be the following, I still get the same error:
> >
> > \def\myloop#1{%
> >   \tempcnta=\the\startcnt%
> >   \loop
> >     \advance \tempcnta by 1
> >     \if\tempcnta=#1\else \repeat\fi
> > }
>
> No, the \repeat take the place of the \fi. Also you should always end
> numbers with a space or a \relax to avoid trouble due to tex trying to
> expand the following commands in search for more numbers.
>
> \newcount\startcnt
> \newcount\tempcnta
>
> \def\myloop#1{%
>   \tempcnta=\the\startcnt\relax%
>   \loop
>     \the\tempcnta,
>     \advance \tempcnta by 1
>     \ifnum\tempcnta<#1
>   \repeat
> }
>
> \myloop{10}

Excellent.  Thanks Ulrike. This fixes the original problem!
Bart
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to