summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-08-31 17:58:55 +0000
committerKarl Berry <karl@freefriends.org>2012-08-31 17:58:55 +0000
commit3301423440393adfdbbcfa0d8471e4b4c63df1e6 (patch)
tree6aa86f66a252f654a2bd2f28ee7b680fdac1b0a3 /Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
parenta511edd7e6a05e250f2b2d8062a470734e3af33d (diff)
l3kernel 3160 (31aug12)
git-svn-id: svn://tug.org/texlive/trunk@27559 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx52
1 files changed, 15 insertions, 37 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
index f3e3955c1b1..107b94ac0ca 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-traps.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-traps.dtx 2479 2011-06-19 21:57:25Z bruno $
+\GetIdInfo$Id: l3fp-traps.dtx 4129 2012-08-20 20:38:28Z mittelba $
{L3 Floating-point exception trapping}
\documentclass[full]{l3doc}
\begin{document}
@@ -118,7 +118,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}
+% \begin{variable}[aux]
% {
% \l_@@_invalid_operation_flag_token ,
% \l_@@_division_by_zero_flag_token ,
@@ -152,7 +152,7 @@
% \begin{itemize}
% \item \cs{@@_invalid_operation:nnw},
% \item \cs{@@_invalid_operation_o:Nww},
-% \item \cs{@@_array_invalid_operation_o:nw},
+% \item \cs{@@_invalid_operation_tl_o:nf},
% \item \cs{@@_division_by_zero_o:Nnw},
% \item \cs{@@_division_by_zero_o:NNww},
% \item \cs{@@_overflow:w},
@@ -163,7 +163,10 @@
% \meta{way of trapping} is one of \texttt{error}, \texttt{flag}, or
% \texttt{none}.
%
-% \begin{macro}{\fp_trap:nn} %^^A todo: user command => document
+% We also provide \cs{@@_invalid_operation_o:nw}, defined in terms of
+% \cs{@@_invalid_operation:nnw}.
+%
+% \begin{macro}{\fp_trap:nn}
% \begin{macrocode}
\cs_new_protected:Npn \fp_trap:nn #1#2
{
@@ -207,7 +210,7 @@
{ \cs_set:Npn \@@_invalid_operation:nnw ##1##2##3; }
{
#1
- \@@_error:nffn { invalid } {##2} { \@@_to_tl:w ##3; } { }
+ \@@_error:nnfn { invalid } {##2} { \@@_to_tl:w ##3; } { }
\fp_flag_on:n { invalid_operation }
##1
}
@@ -221,11 +224,10 @@
\exp_after:wN \c_nan_fp
}
\exp_args:Nno \use:n
- { \cs_set:Npn \@@_array_invalid_operation_o:nw ##1##2@ }
+ { \cs_set:Npn \@@_invalid_operation_tl_o:nf ##1##2 }
{
#1
- \@@_error:nffn { invalid }
- {##1} { \@@_array_to_clist:w ##2 @ } { }
+ \@@_error:nnfn { invalid } {##1} {##2} { }
\fp_flag_on:n { invalid_operation }
\exp_after:wN \c_nan_fp
}
@@ -258,7 +260,7 @@
{ \cs_set:Npn \@@_division_by_zero_o:Nnw ##1##2##3; }
{
#1
- \@@_error:nffn { zero-div } {##2} { \@@_to_tl:w ##3; } { }
+ \@@_error:nnfn { zero-div } {##2} { \@@_to_tl:w ##3; } { }
\fp_flag_on:n { division_by_zero }
\exp_after:wN ##1
}
@@ -343,7 +345,7 @@
% \begin{macro}[int, EXP]
% {
% \@@_invalid_operation:nnw, \@@_invalid_operation_o:Nww,
-% \@@_array_invalid_operation_o:nw,
+% \@@_invalid_operation_tl_o:nf,
% \@@_division_by_zero_o:Nnw, \@@_division_by_zero_o:NNww,
% \@@_overflow:w , \@@_underflow:w
% }
@@ -354,7 +356,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_invalid_operation:nnw #1#2#3; { }
\cs_new:Npn \@@_invalid_operation_o:Nww #1#2; #3; { }
-\cs_new:Npn \@@_array_invalid_operation_o:nw #1 #2 @ { }
+\cs_new:Npn \@@_invalid_operation_tl_o:nf #1 #2 { }
\cs_new:Npn \@@_division_by_zero_o:Nnw #1#2#3; { }
\cs_new:Npn \@@_division_by_zero_o:NNww #1#2#3; #4; { }
\cs_new:Npn \@@_overflow:w { }
@@ -379,39 +381,15 @@
% \subsection{Errors}
%
%^^A begin[todo]
-% \begin{macro}[int, EXP]{\@@_error:nnnn, \@@_error:nffn}
+% \begin{macro}[int, EXP]{\@@_error:nnnn, \@@_error:nnfn, \@@_error:nffn}
% \begin{macrocode}
\cs_new:Npn \@@_error:nnnn #1
{ \__msg_kernel_expandable_error:nnnnn { kernel } { fp - #1 } }
-\cs_generate_variant:Nn \@@_error:nnnn { nff }
+\cs_generate_variant:Nn \@@_error:nnnn { nnf, nff }
% \end{macrocode}
% \end{macro}
% ^^A end[todo]
%
-% ^^A todo: move \@@_array_to_clist:w elsewhere.
-% \begin{macro}[int, EXP]{\@@_array_to_clist:w}
-% \begin{macro}[aux, EXP]{\@@_array_to_clist_i:wwww, \@@_array_to_clist_ii:ww}
-% Converts an array of floating point numbers to a comma-list. Does
-% not work for empty arrays.
-% \begin{macrocode}
-\cs_new:Npn \@@_array_to_clist:w #1 @
- {
- \@@_array_to_clist_i:wwww ;
- #1
- \@@_array_to_clist_ii:ww \s_@@ ; @
- }
-\cs_new:Npn \@@_array_to_clist_i:wwww #1; #2 \s_@@ #3; #4 @
- {
- #2
- \exp_after:wN \@@_array_to_clist_i:wwww
- \tex_romannumeral:D -`0 \@@_to_tl:w \s_@@ #3 ; ;
- #4 , ~ #1 @
- }
-\cs_new:Npn \@@_array_to_clist_ii:ww #1 ; , ~ , ~ #2 @ {#2}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
% \subsection{Messages}
%
% Some messages.