summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3prg.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3prg.dtx53
1 files changed, 46 insertions, 7 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 194181b4c87..9b3ad6dae1c 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 3338 2012-02-08 08:21:42Z joseph $
+\GetIdInfo$Id: l3prg.dtx 3464 2012-02-26 15:30:29Z bruno $
{L3 Experimental control structures}
%</driver|package>
%<*driver>
@@ -289,6 +289,21 @@
% based on this result.
% \end{function}
%
+% \begin{function}[added = 2012-02-09]{\bool_show:N, \bool_show:c}
+% \begin{syntax}
+% \cs{bool_show:N} \meta{boolean}
+% \end{syntax}
+% Displays the logical truth of the \meta{boolean} on the terminal.
+% \end{function}
+%
+% \begin{function}[added = 2012-02-09]{\bool_show:n}
+% \begin{syntax}
+% \cs{bool_show:n} \Arg{boolean expression}
+% \end{syntax}
+% Displays the logical truth of the \meta{boolean expression} on the
+% terminal.
+% \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
@@ -373,7 +388,7 @@
%
% \begin{function}[EXP]{\bool_xor_p:nn}
% \begin{syntax}
-% \cs{bool_xor_p:nn} \Arg{boolexpr1} \Arg{boolexpr1}
+% \cs{bool_xor_p:nn} \Arg{boolexpr_1} \Arg{boolexpr_1}
% \end{syntax}
% Implements an \enquote{exclusive or} operation between two boolean
% expressions. There is no infix operation for this logical
@@ -442,7 +457,7 @@
% ~~~~\Arg{intexpr case1} \Arg{code case1} \\
% ~~~~\Arg{intexpr case2} \Arg{code case2} \\
% ~~~~\ldots \\
-% ~~~~\Arg{intexpr case$_n$} \Arg{code case$_n$} \\
+% ~~~~\Arg{intexpr case$\sb{n}$} \Arg{code case$\sb{n}$} \\
% ~~|}| \\
% ~~\Arg{else case}
% \end{syntax}
@@ -474,7 +489,7 @@
% ~~~~\Arg{dimexpr case1} \Arg{code case1} \\
% ~~~~\Arg{dimexpr case2} \Arg{code case2} \\
% ~~~~\ldots \\
-% ~~~~\Arg{dimexpr case$_n$} \Arg{code case$_n$} \\
+% ~~~~\Arg{dimexpr case$\sb{n}$} \Arg{code case$\sb{n}$} \\
% ~~|}| \\
% ~~\Arg{else case}
% \end{syntax}
@@ -494,7 +509,7 @@
% ~~~~\Arg{string case1} \Arg{code case1} \\
% ~~~~\Arg{string case2} \Arg{code case2} \\
% ~~~~\ldots \\
-% ~~~~\Arg{string case$_n$} \Arg{code case$_n$} \\
+% ~~~~\Arg{string case$\sb{n}$} \Arg{code case$\sb{n}$} \\
% ~~|}| \\
% ~~\Arg{else case}
% \end{syntax}
@@ -520,7 +535,7 @@
% ~~~~\meta{token list variable case1} \Arg{code case1} \\
% ~~~~\meta{token list variable case2} \Arg{code case2} \\
% ~~~~\ldots \\
-% ~~~~\meta{token list variable case$_n$} \Arg{code case$_n$} \\
+% ~~~~\meta{token list variable case$\sb{n}$} \Arg{code case$\sb{n}$} \\
% ~~"}" \\
% ~~\Arg{else case}
% \end{syntax}
@@ -881,6 +896,30 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\bool_show:N, \bool_show:c, \bool_show:n}
+% Show the truth value of the boolean, as \texttt{true} or
+% \texttt{false}. We use \cs{msg_aux_show:x} to get a better output;
+% this function requires its argument to start with |>|.
+% \begin{macrocode}
+\cs_new_protected:Npn \bool_show:N #1
+ {
+ \cs_if_exist:NTF #1
+ { \bool_show:n {#1} }
+ {
+ \msg_kernel_error:nnx { kernel } { variable-not-defined }
+ { \token_to_str:N #1 }
+ }
+ }
+\cs_new_protected:Npn \bool_show:n #1
+ {
+ \bool_if:nTF {#1}
+ { \msg_aux_show:x { > true } }
+ { \msg_aux_show:x { > false } }
+ }
+\cs_generate_variant:Nn \bool_show:N { c }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{variable}{\l_tmpa_bool, \g_tmpa_bool}
% A few booleans just if you need them.
% \begin{macrocode}
@@ -1845,7 +1884,7 @@
% \end{macro}
%
% \subsection{Deprecated functions}
-%
+%
% These were deprecated on 2012-02-08, and will be removed entirely by
% 2012-05-31.
%