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.dtx36
1 files changed, 17 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex/l3kernel/l3prg.dtx
index c849e21ab77..ccd95eb2d6f 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 3086 2011-12-22 17:55:46Z bruno $
+\GetIdInfo$Id: l3prg.dtx 3122 2011-12-31 20:57:36Z joseph $
{L3 Experimental control structures}
%</driver|package>
%<*driver>
@@ -75,17 +75,17 @@
% states are possible, say an \meta{error} state for erroneous
% input, \emph{e.g.}, text as input in a function comparing integers.
%
-% \LaTeX3 has two primary forms of conditional flow processing based
-% on these states. One type is predicate functions that turn the
+% \LaTeX3 has two forms of conditional flow processing based
+% on these states. The firs form is predicate functions that turn the
% returned state into a boolean \meta{true} or \meta{false}. For
% example, the function |\cs_if_free_p:N| checks whether the control
% sequence given as its argument is free and then returns the boolean
% \meta{true} or \meta{false} values to be used in testing with
-% |\if_predicate:w| or in functions to be described below. The other type
+% |\if_predicate:w| or in functions to be described below. The second form
% is the kind of functions choosing a particular argument from the
% input stream based on the result of the testing as in
% |\cs_if_free:NTF| which also takes one argument (the |N|) and then
-% executes either \meta{true} or \meta{false} depending on the
+% executes either \texttt{true} or \texttt{false} depending on the
% result. Important to note here is that the arguments are executed
% after exiting the underlying |\if...\fi:| structure.
%
@@ -100,7 +100,7 @@
% \cs{prg_set_conditional:Npnn} \cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
% \cs{prg_set_conditional:Nnn} \cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code}
% \end{syntax}
-% These functions creates a family of conditionals using the same
+% These functions create a family of conditionals using the same
% \Arg{code} to perform the test created. The \texttt{new} version will
% check for existing definitions (\emph{cf.}~\cs{cs_new:Npn}) whereas
% the \texttt{set} version will not (\emph{cf.}~\cs{cs_set:Npn}). The
@@ -154,11 +154,11 @@
% \prg_return_true:
% \else:
% \prg_return_false:
-% \fi:
-% \fi:
-% }
+% \fi:
+% \fi:
+% }
% \end{verbatim}
-% This defines the function |\foo_if_bar_p:NN|, |\foo_if_bar:NNTF|,
+% This defines the function |\foo_if_bar_p:NN|, |\foo_if_bar:NNTF| and
% |\foo_if_bar:NNT| but not |\foo_if_bar:NNF| (because |F| is missing from
% the \meta{conds} list). The return statements
% take care of resolving the remaining |\else:| and |\fi:| before
@@ -172,12 +172,10 @@
% \prg_new_protected_conditional:Nnn, \prg_set_protected_conditional:Nnn
% }
% \begin{syntax}
-% \cs{prg_set_protected_conditional:Npnn}
-% ~~\cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
-% \cs{prg_set_protected_conditional:Nnn}
-% ~~\cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code}
+% \cs{prg_set_protected_conditional:Npnn} \cs{\meta{name}:\meta{arg spec}} \meta{parameters} \Arg{conditions} \Arg{code} \\
+% \cs{prg_set_protected_conditional:Nnn} \cs{\meta{name}:\meta{arg spec}} \Arg{conditions} \Arg{code}
% \end{syntax}
-% These functions creates a family of conditionals using the same
+% These functions create a family of conditionals using the same
% \Arg{code} to perform the test created. The \texttt{new} version will
% check for existing definitions (\emph{cf.}~\cs{cs_new:Npn}) whereas
% the \texttt{set} version will not (\emph{cf.}~\cs{cs_set:Npn}). The
@@ -605,8 +603,8 @@
% (using \meta{step} between each \meta{value}). Thus \meta{function}
% should absorb one numerical argument. For example
% \begin{verbatim}
-% \cs_set_nopar:Npn \my_func:n #1 { [I~saw~#1] \quad }
-% \prg_stepwise_function:nnnN { 1 } { 5 } { 1 } \my_func:n
+% \cs_set:Npn \my_func:n #1 { [I~saw~#1] \quad }
+% \prg_stepwise_function:nnnN { 1 } { 1 } { 5 } \my_func:n
% \end{verbatim}
% would print
% \begin{quote}
@@ -941,9 +939,9 @@
% This function evaluates a boolean expression and assigns the first
% argument the meaning |\c_true_bool| or |\c_false_bool|.
% \begin{macrocode}
-\cs_new:Npn \bool_set:Nn #1#2
+\cs_new_protected:Npn \bool_set:Nn #1#2
{ \tex_chardef:D #1 = \bool_if_p:n {#2} }
-\cs_new:Npn \bool_gset:Nn #1#2
+\cs_new_protected:Npn \bool_gset:Nn #1#2
{ \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} }
\cs_generate_variant:Nn \bool_set:Nn { c }
\cs_generate_variant:Nn \bool_gset:Nn { c }