* What's the difference between \dodoubleargument and \dodoubleempty?
@ 2008-10-21 11:32 Ruini Xue
2008-10-21 11:39 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Ruini Xue @ 2008-10-21 11:32 UTC (permalink / raw)
To: ntg-context
It's difficult to understand them from the code.
-- 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the difference between \dodoubleargument and \dodoubleempty?
2008-10-21 11:32 What's the difference between \dodoubleargument and \dodoubleempty? Ruini Xue
@ 2008-10-21 11:39 ` Hans Hagen
2008-10-21 12:03 ` Ruini Xue
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2008-10-21 11:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
Ruini Xue wrote:
> It's difficult to understand them from the code.
the first one issues a warning when no argument is given
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the difference between \dodoubleargument and \dodoubleempty?
2008-10-21 11:39 ` Hans Hagen
@ 2008-10-21 12:03 ` Ruini Xue
2008-10-21 12:17 ` Wolfgang Schuster
2008-10-21 12:43 ` Hans Hagen
0 siblings, 2 replies; 6+ messages in thread
From: Ruini Xue @ 2008-10-21 12:03 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the difference between \dodoubleargument and \dodoubleempty?
2008-10-21 12:03 ` Ruini Xue
@ 2008-10-21 12:17 ` Wolfgang Schuster
2008-10-21 12:23 ` Ruini Xue
2008-10-21 12:43 ` Hans Hagen
1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2008-10-21 12:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, Oct 21, 2008 at 2:03 PM, Ruini Xue <xueruini@gmail.com> wrote:
> 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]
You need a comment sign at the end of the line.
\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?
This is just a empty argument.
> \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"
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What's the difference between \dodoubleargument and \dodoubleempty?
2008-10-21 12:03 ` Ruini Xue
2008-10-21 12:17 ` Wolfgang Schuster
@ 2008-10-21 12:43 ` Hans Hagen
1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2008-10-21 12:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
Ruini Xue wrote:
> 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:
we use optimized variants for #args <=3 but the error messags still
shows up for
\doquadrupleargument\relax
\doquadrupleargument\relax[1]
\doquadrupleargument\relax[1][2]
\doquadrupleempty\relax
\doquadrupleempty\relax[1]
\doquadrupleempty\relax[1][2]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-10-21 12:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-21 11:32 What's the difference between \dodoubleargument and \dodoubleempty? Ruini Xue
2008-10-21 11:39 ` Hans Hagen
2008-10-21 12:03 ` Ruini Xue
2008-10-21 12:17 ` Wolfgang Schuster
2008-10-21 12:23 ` Ruini Xue
2008-10-21 12:43 ` Hans Hagen
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).