diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prg.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3prg.dtx | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx index 9b3ad6dae1c..88f53e59759 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx @@ -35,7 +35,7 @@ % %<*driver|package> \RequirePackage{l3names} -\GetIdInfo$Id: l3prg.dtx 3464 2012-02-26 15:30:29Z bruno $ +\GetIdInfo$Id: l3prg.dtx 3490 2012-03-04 01:00:53Z bruno $ {L3 Experimental control structures} %</driver|package> %<*driver> @@ -224,9 +224,9 @@ % logical operations And, Or, Not, \emph{etc.}\ which can then be used on % both the boolean type and predicate functions. % -% All conditional |\bool_| functions are expandable and expect the -% input to also be fully expandable (which will generally mean being -% constructed from predicate functions, possibly nested). +% All conditional |\bool_| functions except assignments are expandable +% and expect the input to also be fully expandable (which will generally +% mean being constructed from predicate functions, possibly nested). % % \begin{function}{\bool_new:N, \bool_new:c} % \begin{syntax} @@ -304,6 +304,16 @@ % terminal. % \end{function} % +% \begin{function}[EXP, pTF, added=2012-03-03] +% {\bool_if_exist:N, \bool_if_exist:c} +% \begin{syntax} +% \cs{bool_if_exist_p:N} \meta{boolean} +% \cs{bool_if_exist:NTF} \meta{boolean} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests whether the \meta{boolean} is currently defined. This does not +% check that the \meta{boolean} really is a boolean variable. +% \end{function} +% % \begin{variable}{\l_tmpa_bool} % A scratch boolean for local assignment. It is never used by % the kernel code, and so is safe for use with any \LaTeX3-defined @@ -903,7 +913,7 @@ % \begin{macrocode} \cs_new_protected:Npn \bool_show:N #1 { - \cs_if_exist:NTF #1 + \bool_if_exist:NTF #1 { \bool_show:n {#1} } { \msg_kernel_error:nnx { kernel } { variable-not-defined } @@ -928,6 +938,20 @@ % \end{macrocode} % \end{variable} % +% \begin{macro}[pTF]{\bool_if_exist:N, \bool_if_exist:c} +% Copies of the \texttt{cs} functions defined in \pkg{l3basics}. +% \begin{macrocode} +\cs_new_eq:NN \bool_if_exist:NTF \cs_if_exist:NTF +\cs_new_eq:NN \bool_if_exist:NT \cs_if_exist:NT +\cs_new_eq:NN \bool_if_exist:NF \cs_if_exist:NF +\cs_new_eq:NN \bool_if_exist_p:N \cs_if_exist_p:N +\cs_new_eq:NN \bool_if_exist:cTF \cs_if_exist:cTF +\cs_new_eq:NN \bool_if_exist:cT \cs_if_exist:cT +\cs_new_eq:NN \bool_if_exist:cF \cs_if_exist:cF +\cs_new_eq:NN \bool_if_exist_p:c \cs_if_exist_p:c +% \end{macrocode} +% \end{macro} +% % \subsection{Boolean expressions} % % \begin{macro}[pTF]{\bool_if:n} |