From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/44914 Path: news.gmane.org!not-for-mail From: Ruini Xue Newsgroups: gmane.comp.tex.context Subject: Re: =?utf-8?q?What=27s_the_difference_between_=5Cdodoub?= =?utf-8?q?leargument_and=09=5Cdodoubleempty=3F?= Date: Tue, 21 Oct 2008 12:03:19 +0000 (UTC) Message-ID: References: <48FDBF73.2000706@wxs.nl> 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 1224590781 5200 80.91.229.12 (21 Oct 2008 12:06:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2008 12:06:21 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 21 14:07:19 2008 connect(): Connection refused 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 1KsG05-0004f3-Hd for gctc-ntg-context-518@m.gmane.org; Tue, 21 Oct 2008 14:06:13 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 301541FBF9; Tue, 21 Oct 2008 14:05:03 +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 32399-02-5; Tue, 21 Oct 2008 14:04:07 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C3CE11FB6D; Tue, 21 Oct 2008 14:04:07 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3C74F1FADB for ; Tue, 21 Oct 2008 14:04:06 +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 01470-01-2 for ; Tue, 21 Oct 2008 14:03:28 +0200 (CEST) Original-Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by ronja.ntg.nl (Postfix) with ESMTP id 499A21FBDB for ; Tue, 21 Oct 2008 14:03:28 +0200 (CEST) Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KsFxP-0007Xu-Sv for ntg-context@ntg.nl; Tue, 21 Oct 2008 12:03:27 +0000 Original-Received: from tide535.microsoft.com ([131.107.0.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2008 12:03:27 +0000 Original-Received: from xueruini by tide535.microsoft.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 21 Oct 2008 12:03:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 131.107.0.105 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.30 Safari/525.13) 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:44914 Archived-At: Hans Hagen wxs.nl> writes: > > Ruini Xue wrote: > > It's difficult to understand them from the code. > > the first one issues a warning when no argument is given You mean both of them ask the following \command to take two mandatory arguments? I try this example: ====================================== \def\test {\dodoubleargument\dotest} % use \dodoubleempty \def\dotest[#1][#2] {\iffirstargument First arg: #1 \fi \ifsecondargument Second arg: #2 \fi} \test[ok][ok] % 1. this is ok \test [ok] [] % 2. warning? \test [wrong] % 3. Error: lack one arg ================================== both 1 and 2 can print "First arg" and "Second arg", so I am confused what's "no argument is given" -- ruini ___________________________________________________________________________________ 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 ___________________________________________________________________________________