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.dtx35
1 files changed, 33 insertions, 2 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index 9881cc3ef64..51cbb0a2671 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 2896 2011-10-09 20:36:50Z joseph $
+\GetIdInfo$Id: l3prg.dtx 2915 2011-10-15 21:21:08Z bruno $
{L3 Experimental control structures}
%</driver|package>
%<*driver>
@@ -743,6 +743,24 @@
% \emph{etc.})
% \end{function}
%
+% \begin{function}[EXP]{\if_predicate:w}
+% \begin{syntax}
+% "\if_predicate:w" <predicate> <true code> "\else:" <false code> "\fi:"
+% \end{syntax}
+% This function takes a predicate function and
+% branches according to the result. (In practice this function would also
+% accept a single boolean variable in place of the <predicate> but to make the
+% coding clearer this should be done through "\if_bool:N".)
+% \end{function}
+%
+% \begin{function}[EXP]{\if_bool:N}
+% \begin{syntax}
+% "\if_bool:N" <boolean> <true code> "\else:" <false code> "\fi:"
+% \end{syntax}
+% This function takes a boolean variable and
+% branches according to the result.
+% \end{function}
+%
% \section{Experimental programmings functions}
%
% \begin{function}{\prg_quicksort:n}
@@ -804,6 +822,19 @@
%</package>
% \end{macrocode}
%
+% \subsection{Primitive conditionals}
+%
+% \begin{macro}{\if_bool:N}
+% \begin{macro}{\if_predicate:w}
+% Those two primitive \TeX{} conditionals are synonyms.
+% They should not be used outside the kernel code.
+% \begin{macrocode}
+\tex_let:D \if_bool:N \tex_ifodd:D
+\tex_let:D \if_predicate:w \tex_ifodd:D
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Defining a set of conditional functions}
%
% \begin{macro}
@@ -914,7 +945,7 @@
% \begin{macrocode}
\prg_new_conditional:Npnn \bool_if:N #1 { p , T , F , TF }
{
- \if_bool:N #1
+ \if_meaning:w \c_true_bool #1
\prg_return_true:
\else:
\prg_return_false: