Date:
Sun, 7 Jul 2013 15:07:35 -0400
MIME-Version:
1.0
Content-Type:
text/plain; charset=ISO-8859-1
|
Hi,
>> In fact one could think of also having
>>
>> \<thing>_case:nnTF
>>
>> where the T branch is selected if you have a match (in addition to
>> executing any match code from the "n" argument).
> This sounds more logical for me and I really like this idea. I think the
> true part is mostly a message instead of a function. However for me as a
> beginner it's more consistent in a expl3 manner. ;-)
>
> So after this small discuss I vote for the following:
>
> \<thing>_case:nn_p
> \<thing>_case:nnF
> \<thing>_case:nnT
> \<thing>_case:nnTF
I don't think we can really have \<thing>_case_p:nn (note that you
misplaced the "_p"), because the \<thing>_case:nn part leaves tokens
in the input stream, that would interact badly with the boolean
expression code. E.g.,
\bool_if:nTF { \int_case_p:nn {1*0} { {0}{} {1}{} } }
would only work because all "code" brace groups are empty. I believe
that such a situation would be a job for a different function,
\<thing>_any:nn(TF), to be discussed separately:
\int_if_any:nnTF {1*0} { {0} {1} } ...
\bool_if:nTF { \int_if_any_p:nn {1*0} { {0} {1} } } ...
Regards,
Bruno
|
|
|