Hi Bart, On Thu, Dec 11, 2008 at 10:21 PM, Bart C. Wise <[EMAIL PROTECTED]> wrote:
> > 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 > } > > Bart > No, you should define like: \def\myloop#1{% \tempcnta=\the\startcnt% \loop \advance \tempcnta by 1 \if\tempcnta<#1\repeat } No \else before \repeat in this case and no \fi outside the loop. Taking a look at the definition, you could find the following code (something like that, I can't remember clearly): \def\loop#1\repeat{\def\body{#1}\iterate} \def\iterate{something to do with \body} You can see there should not be an extra \else in the \body, and you don't need the \fi to enclose it. I don't know whether I've made my point clear. -- 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 ---------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________