diff options
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3intarray.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3intarray.dtx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/macros/latex/contrib/l3kernel/l3intarray.dtx b/macros/latex/contrib/l3kernel/l3intarray.dtx index 6ab5647a82..7a96ed2873 100644 --- a/macros/latex/contrib/l3kernel/l3intarray.dtx +++ b/macros/latex/contrib/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2020-06-18} +% \date{Released 2020-07-17} % % \maketitle % @@ -266,29 +266,28 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}[EXP]{\@@_bounds:NNnTF, \@@_bounds_error:NNn} +% \begin{macro}[EXP]{\@@_bounds:NNnTF, \@@_bounds_error:NNnw} % The functions \cs{intarray_gset:Nnn} and \cs{intarray_item:Nn} share % bounds checking. The |T| branch is used if |#3| is within bounds of % the array |#2|. % \begin{macrocode} -\cs_new:Npn \@@_bounds:NNnTF #1#2#3#4#5 +\cs_new:Npn \@@_bounds:NNnTF #1#2#3 { \if_int_compare:w 1 > #3 \exp_stop_f: - \@@_bounds_error:NNn #1 #2 {#3} - #5 + \@@_bounds_error:NNnw #1 #2 {#3} \else: \if_int_compare:w #3 > \intarray_count:N #2 \exp_stop_f: - \@@_bounds_error:NNn #1 #2 {#3} - #5 - \else: - #4 + \@@_bounds_error:NNnw #1 #2 {#3} \fi: \fi: + \use_i:nn } -\cs_new:Npn \@@_bounds_error:NNn #1#2#3 +\cs_new:Npn \@@_bounds_error:NNnw #1#2#3#4 \use_i:nn #5#6 { + #4 #1 { kernel } { out-of-bounds } { \token_to_str:N #2 } {#3} { \intarray_count:N #2 } + #6 } % \end{macrocode} % \end{macro} |