diff options
Diffstat (limited to 'macros/latex/required/l3kernel/l3int.dtx')
-rw-r--r-- | macros/latex/required/l3kernel/l3int.dtx | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/macros/latex/required/l3kernel/l3int.dtx b/macros/latex/required/l3kernel/l3int.dtx index 45050964de..9782fe452c 100644 --- a/macros/latex/required/l3kernel/l3int.dtx +++ b/macros/latex/required/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2024-05-27} +% \date{Released 2024-11-02} % % \maketitle % @@ -100,21 +100,6 @@ % restricted-expandable functions can both be used, and \cs{exp_not:n} % and its variants have no effect while \cs{exp_not:N} may incorrectly % interrupt the expression. -% \begin{texnote} -% Exactly two expansions are needed to evaluate \cs{int_eval:n}. -% The result is \emph{not} an \meta{internal integer}, and therefore -% should be terminated by a space if used in \cs{int_value:w} or in -% a \TeX{}-style integer assignment. -% -% As all \TeX{} integers, integer operands can also be: -% \tn{value}\Arg{\LaTeXe{} counter}; dimension or skip variables, -% converted to integers in~\texttt{sp}; the character code of some -% character given as \texttt{`}\meta{char} or -% \texttt{`\textbackslash}\meta{char}; octal numbers given as -% \texttt{'} followed by digits from \texttt{0} to \texttt{7}; or -% hexadecimal numbers given as |"| followed by digits and upper case -% letters from \texttt{A} to~\texttt{F}. -% \end{texnote} % % \begin{function}[EXP]{\int_eval:n} % \begin{syntax} @@ -277,11 +262,11 @@ % \begin{function}[EXP, pTF, added=2012-03-03] % {\int_if_exist:N, \int_if_exist:c} % \begin{syntax} -% \cs{int_if_exist_p:N} \meta{int} -% \cs{int_if_exist:NTF} \meta{int} \Arg{true code} \Arg{false code} +% \cs{int_if_exist_p:N} \meta{integer} +% \cs{int_if_exist:NTF} \meta{integer} \Arg{true code} \Arg{false code} % \end{syntax} -% Tests whether the \meta{int} is currently defined. This does not -% check that the \meta{int} really is an integer variable. +% Tests whether the \meta{integer} is currently defined. This does not +% check that the \meta{integer} really is an integer variable. % \end{function} % % \section{Setting and incrementing integers} @@ -310,7 +295,10 @@ % \end{function} % % \begin{function}[updated = 2011-10-22] -% {\int_set:Nn, \int_set:cn, \int_gset:Nn, \int_gset:cn} +% { +% \int_set:Nn, \int_set:cn, \int_set:NV, \int_set:cV, +% \int_gset:Nn, \int_gset:cn, \int_gset:MV, \int_gset:cV +% } % \begin{syntax} % \cs{int_set:Nn} \meta{integer} \Arg{int expr} % \end{syntax} @@ -426,7 +414,8 @@ % \end{syntax} % This function evaluates the \meta{test int expr} and % compares this in turn to each of the -% \meta{int expr cases}. If the two are equal then the +% \meta{int expr case}s until a match is found. +% If the two are equal then the % associated \meta{code} is left in the input stream % and other cases are discarded. If any of the % cases are matched, the \meta{true code} is also inserted into the @@ -445,6 +434,10 @@ % { No idea! } % \end{verbatim} % leaves \enquote{\texttt{Medium}} in the input stream. +% Since evaluation of the test expressions stops at the first +% successful case, the order of possible matches should normally +% be that the most likely are earlier: this will reduce the average +% steps required to complete expansion. % \end{function} % % \begin{function}[EXP,pTF]{\int_if_even:n, \int_if_odd:n} @@ -1483,9 +1476,9 @@ % \end{macro} % \end{macro} % -% \begin{macro}{\int_set:Nn, \int_set:cn} +% \begin{macro}{\int_set:Nn, \int_set:cn, \int_set:NV, \int_set:cV} % \UnitTested -% \begin{macro}{\int_gset:Nn, \int_gset:cn} +% \begin{macro}{\int_gset:Nn, \int_gset:cn, \int_gset:NV, \int_gset:cV} % \UnitTested % As integers are register-based \TeX{} issues an error % if they are not defined. While the |=| sign is optional, this @@ -1496,8 +1489,8 @@ { #1 = \@@_eval:w #2 \@@_eval_end: } \cs_new_protected:Npn \int_gset:Nn #1#2 { \tex_global:D #1 = \@@_eval:w #2 \@@_eval_end: } -\cs_generate_variant:Nn \int_set:Nn { c } -\cs_generate_variant:Nn \int_gset:Nn { c } +\cs_generate_variant:Nn \int_set:Nn { NV , c , cV } +\cs_generate_variant:Nn \int_gset:Nn { NV , c , cV } % \end{macrocode} % \end{macro} % \end{macro} |