Hi Bart
On Thu, Dec 11, 2008 at 9:50 PM, Bart C. Wise
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
I think the loop structure should be: \loop ... \if... ... \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
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- Best Regards Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ----------------------------------------------------------------