From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/17769 Path: main.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: optional arguments, if(nth)argument Date: Thu, 6 Jan 2005 20:24:47 +0100 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1105039510 26368 80.91.229.6 (6 Jan 2005 19:25:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 Jan 2005 19:25:10 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jan 06 20:24:54 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CmdFd-0004LG-00 for ; Thu, 06 Jan 2005 20:24:53 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7A3281279A; Thu, 6 Jan 2005 20:24:52 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00844-03; Thu, 6 Jan 2005 20:24:50 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id ED7D61278A; Thu, 6 Jan 2005 20:24:49 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3F63B1278A for ; Thu, 6 Jan 2005 20:24:49 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 00683-06 for ; Thu, 6 Jan 2005 20:24:48 +0100 (CET) Original-Received: from moutng.kundenserver.de (unknown [212.227.126.184]) by ronja.ntg.nl (Postfix) with ESMTP id 81E8E12775 for ; Thu, 6 Jan 2005 20:24:48 +0100 (CET) Original-Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CmdFY-0005X8-00 for ntg-context@ntg.nl; Thu, 06 Jan 2005 20:24:48 +0100 Original-Received: from [83.77.231.158] (helo=[192.168.1.3]) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CmdFY-0007yN-00 for ntg-context@ntg.nl; Thu, 06 Jan 2005 20:24:48 +0100 Original-To: ConTeXt ML X-Mailer: Apple Mail (2.619) X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:033f42bdb3cd4a3c9b0966e414a370c7 X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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: by amavisd-new at ntg.nl Xref: main.gmane.org gmane.comp.tex.context:17769 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:17769 Hello again! Today I'm trying a lot of new (to me) things... This time, a macro with optional arguments and \if...argument : \def\SkillField{\dodoubleempty\doSkillField} \def\doSkillField[#1][#2]#3{\bTR\bTD #3 \iffirstargument\hfill (#1)\fi % don't print when no = optional=20 argument \eTD \bTD \ifsecondargument % if second optional arg is = provided \definefield[#2][line][Skill][#1]\field[#2] \else % if no second optional arg \definefield[#3][line][Skill][#3]\field[#3] \fi \eTD\eTR} e.g. \SkillField[+8][Aergern]{=C4rgern} % works \SkillField[+1]{Labern} % does nothing instead of "else" \SkillField{Testen} % does "\hfill (#1)", but should do nothing Apparently, the \if...argument ... \else don't work as they should. Where's my mistake? Gr=FC=DFlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net=