From: Ruini Xue <xueruini@gmail.com>
To: ntg-context@ntg.nl
Subject: Re: What's the difference between \dodoubleargument and \dodoubleempty?
Date: Tue, 21 Oct 2008 12:03:19 +0000 (UTC) [thread overview]
Message-ID: <loom.20081021T115324-3@post.gmane.org> (raw)
In-Reply-To: <48FDBF73.2000706@wxs.nl>
Hans Hagen <pragma <at> 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
___________________________________________________________________________________
next prev parent reply other threads:[~2008-10-21 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 11:32 Ruini Xue
2008-10-21 11:39 ` Hans Hagen
2008-10-21 12:03 ` Ruini Xue [this message]
2008-10-21 12:17 ` Wolfgang Schuster
2008-10-21 12:23 ` Ruini Xue
2008-10-21 12:43 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20081021T115324-3@post.gmane.org \
--to=xueruini@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).