diff options
author | Karl Berry <karl@freefriends.org> | 2015-11-05 00:01:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-11-05 00:01:25 +0000 |
commit | e6cb7eab17b3ef76d3f96c8e23782a91190102a8 (patch) | |
tree | 1d90b38b9c413bb2fc8c07c9cec8da785b30bb20 /Master/texmf-dist/source/latex/l3kernel/l3prg.dtx | |
parent | cffa5da405ae09ac7a50a8a46795ac83e5bc18dc (diff) |
latex3 (4nov15)
git-svn-id: svn://tug.org/texlive/trunk@38776 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3prg.dtx | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index 1fc47d225b9..08cd5acc89d 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -37,7 +37,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3prg.dtx 6208 2015-10-09 20:01:54Z joseph $ +\GetIdInfo$Id: l3prg.dtx 6216 2015-11-01 23:32:43Z bruno $ {L3 Control structures} %</driver|package> %<*driver> @@ -391,6 +391,23 @@ % the next predicate or group. % \end{function} % +% \begin{function}[EXP, updated = 2012-07-08]{\bool_not_p:n} +% \begin{syntax} +% \cs{bool_not_p:n} \Arg{boolean expression} +% \end{syntax} +% Function version of |!(|\meta{boolean expression}|)| within a boolean +% expression. +% \end{function} +% +% \begin{function}[EXP, updated = 2012-07-08]{\bool_xor_p:nn} +% \begin{syntax} +% \cs{bool_xor_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_2} +% \end{syntax} +% Implements an \enquote{exclusive or} operation between two boolean +% expressions. There is no infix operation for this logical +% operator. +% \end{function} +% % \section{Logical loops} % % Loops using either boolean expressions or stored boolean values. @@ -1205,6 +1222,31 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\bool_not_p:n} +% \UnitTested +% The Not variant just reverses the outcome of \cs{bool_if_p:n}. Can +% be optimized but this is nice and simple and according to the +% implementation plan. Not even particularly useful to have it when +% the infix notation is easier to use. +% \begin{macrocode} +\cs_new:Npn \bool_not_p:n #1 { \bool_if_p:n { ! ( #1 ) } } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\bool_xor_p:nn} +% \UnitTested +% Exclusive or. If the boolean expressions have same truth value, +% return false, otherwise return true. +% \begin{macrocode} +\cs_new:Npn \bool_xor_p:nn #1#2 + { + \int_compare:nNnTF { \bool_if_p:n {#1} } = { \bool_if_p:n {#2} } + \c_false_bool + \c_true_bool + } +% \end{macrocode} +% \end{macro} +% % \subsection{Logical loops} % % \begin{macro}{\bool_while_do:Nn, \bool_while_do:cn} |