From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/46267 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: Re: ! Extra \else error Date: Thu, 11 Dec 2008 22:05:05 +0800 Message-ID: <769ba7780812110605t794abb4bhf84d2c28f5d4e05@mail.gmail.com> References: <200812110650.53610.bntgcontext@wiseguysweb.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1229004522 32409 80.91.229.12 (11 Dec 2008 14:08:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 14:08:42 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 11 15:09:39 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LAmET-00009A-SA for gctc-ntg-context-518@m.gmane.org; Thu, 11 Dec 2008 15:09:37 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 63EA51FC06; Thu, 11 Dec 2008 15:08:24 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31090-06-12; Thu, 11 Dec 2008 15:07:24 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 105C41FB8F; Thu, 11 Dec 2008 15:06:55 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2BD1B1FB89 for ; Thu, 11 Dec 2008 15:06:53 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00941-03-5 for ; Thu, 11 Dec 2008 15:06:10 +0100 (CET) Original-Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by ronja.ntg.nl (Postfix) with ESMTP id C1AEA1FC36 for ; Thu, 11 Dec 2008 15:05:06 +0100 (CET) Original-Received: by wf-out-1314.google.com with SMTP id 27so647584wfd.5 for ; Thu, 11 Dec 2008 06:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=WaiTRldIbfNsKnJUBezcHNY4vldT5P4y9h4IbAsQi5Q=; b=sLn8MlWPuCpg4B4VZfoVhmDczhtRK0mNQFocM58WoYXogVZnCCBZ6/BXw0DRa1TKfa Acs6ZvvY18rSyloSIAKRggFfxCAr/N5vPGAIRPcfj+gZ4uAnYTittW04Y2+Cp2kyPVuZ rx3n3uK/SiqVYrGr+B7Kh6WwTe2nTSG72Sysw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=OJYm/0cVPtdz9PdnjwcJOcjMumEZ83w/45FktJUxGCkOgQH+POW3XDbonqGWMD5chT HUpOU9VVLdPQt+lkm0+4+ADnj0nBIKhCKwbI4VTjCPQbYOcGHWmBTCOr4MArIz8/C9VQ 6uaRfc2sVftRBpamtuR6l/QDXzZUMNwAZhpaA= Original-Received: by 10.142.178.13 with SMTP id a13mr805887wff.93.1229004305328; Thu, 11 Dec 2008 06:05:05 -0800 (PST) Original-Received: by 10.142.253.8 with HTTP; Thu, 11 Dec 2008 06:05:05 -0800 (PST) In-Reply-To: <200812110650.53610.bntgcontext@wiseguysweb.com> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:46267 Archived-At: Hi Bart On Thu, Dec 11, 2008 at 9:50 PM, Bart C. Wise wrote: > 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 ---------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________