[NTG-context] ! Extra \else error

Bart C. Wise bntgcontext at wiseguysweb.com
Thu Dec 11 14:50:52 CET 2008


When I run the code below (via minimals), I get the following error, why?

enter loop
! Extra \else.
\@@plniterate ...\expandafter \@@plniterate \else
                                                  \fi
\myloop ...by 1 \ifnum \tempcnta >#1\else \repeat
                                                  \fi \message {exit}
l.16 \myloop{2008}


Code:

\newcount\startcnt
\newcount\tempcnta

\def\myloop#1{%
  \message{enter}
  \tempcnta=\the\startcnt%
  \loop
    \message{loop}
    \advance \tempcnta by 1
    \ifnum\tempcnta>#1\else \repeat\fi
  \message{exit}
}

\starttext
\startcnt=1800
\myloop{2008}
\stoptext

Thanks,
Bart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20081211/ea652248/attachment.html>


More information about the ntg-context mailing list