From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/43716 Path: news.gmane.org!not-for-mail From: "Thomas A. Schmitz" Newsgroups: gmane.comp.tex.context Subject: Re: system macros/doquadrupleemtpy Date: Thu, 4 Sep 2008 10:21:52 +0200 Message-ID: <9618C0E2-4432-4724-89B9-810831ED5DB3@uni-bonn.de> References: <115224fb0809032345u4c29ccf2o5b8f76df7d3535d7@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220517961 29410 80.91.229.12 (4 Sep 2008 08:46:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Sep 2008 08:46:01 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Sep 04 10:46:55 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 1KbAUR-0003Va-5X for gctc-ntg-context-518@m.gmane.org; Thu, 04 Sep 2008 10:46:55 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 194D21FF7C; Thu, 4 Sep 2008 10:45:26 +0200 (CEST) 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 11546-05-35; Thu, 4 Sep 2008 10:44:38 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 167001FF2A; Thu, 4 Sep 2008 10:34:01 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 830E51FF24 for ; Thu, 4 Sep 2008 10:33:44 +0200 (CEST) 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 04142-03-73 for ; Thu, 4 Sep 2008 10:33:01 +0200 (CEST) Original-Received: from mailout05.t-online.de (mailout05.t-online.de [194.25.134.82]) by ronja.ntg.nl (Postfix) with ESMTP id 1E2AA1FF81 for ; Thu, 4 Sep 2008 10:22:10 +0200 (CEST) Original-Received: from fwd35.aul.t-online.de by mailout05.sul.t-online.de with smtp id 1KbA6T-0005CK-01; Thu, 04 Sep 2008 10:22:09 +0200 Original-Received: from [192.168.0.2] (ZkAROTZV8hxWJ9HsSiXNDtynr5rDtEnchTgmCdSULbpYsFvMUQiMbnNU+Et+R0ogYR@[87.178.100.44]) by fwd35.aul.t-online.de with esmtp id 1KbA6D-1XDJwW0; Thu, 4 Sep 2008 10:21:53 +0200 In-Reply-To: <115224fb0809032345u4c29ccf2o5b8f76df7d3535d7@mail.gmail.com> X-Mailer: Apple Mail (2.926) X-ID: ZkAROTZV8hxWJ9HsSiXNDtynr5rDtEnchTgmCdSULbpYsFvMUQiMbnNU+Et+R0ogYR@t-dialin.net X-TOI-MSGID: 4e15cebc-b144-48f6-8767-bdbaa2e10976 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:43716 Archived-At: On Sep 4, 2008, at 8:45 AM, Wolfgang Schuster wrote: > \def\Commanda > {\doquadrupleempty\doCommanda} > > \def\doCommanda[#1][#2][#3][#4]% > {\iffourthargument > \def\next{\doCommandafive[#1][#2][#3][#4]}% > \else > \def\next{\doCommandafour[#1][#2][#3]}% > \fi\next} > > \def\doCommandafive[#1][#2][#3][#4]#5% > {five arguments} > > \def\doCommandafour[#1][#2][#3]#4% > {four arguments} > > > \def\Commandb > {\doquadrupleempty\doCommandb} > > \def\doCommandb[#1][#2][#3][#4]% > {\iffourthargument > \def\next{\dodoCommandb[#1][#2][#3][#4]}% > \else > \def\next{\dodoCommandb[#1][#2][#3][]}% > \fi\next} > > \def\dodoCommandb[#1][#2][#3][#4]#5% > {\doifelsenothing{#4} > {four arguments} > {five arguments}} > > \starttext > > \Commanda[1][2][3][4]{5} > > \Commanda[1][2][3]{4} > > \Commandb[1][2][3][4]{5} > > \Commandb[1][2][3]4 > > \Commandb[1][2][3][]{4} % feature > > \stoptext > > Wolfgang YES! That's the end of my suffering!! Thanks a lot, Wolfgang, you're my hero. Makes sense, too, now that I look at it. Now I'm gonna find out what \next does... Thanks! Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________