Skip to content

Commit

Permalink
chk fp
Browse files Browse the repository at this point in the history
because `\fp_use:N \undefined` eventually errors hard, this check needs to abort if it fails
  • Loading branch information
wspr committed Jan 16, 2019
1 parent 8f84488 commit a1b3595
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion l3kernel/l3fp-convert.dtx
Expand Up @@ -544,7 +544,16 @@
% \begin{macro}[EXP]{\fp_use:N, \fp_use:c, \fp_eval:n}
% Those public functions are simple copies of the decimal conversions.
% \begin{macrocode}
\cs_new_eq:NN \fp_use:N \fp_to_decimal:N
\__kernel_if_debug:TF
{
\cs_new:Npn \fp_use:N #1
{
\__kernel_chk_var_exist:NT #1 { \fp_to_decimal:N #1 }
}
}
{
\cs_new_eq:NN \fp_use:N \fp_to_decimal:N
}
\cs_generate_variant:Nn \fp_use:N { c }
\cs_new_eq:NN \fp_eval:n \fp_to_decimal:n
% \end{macrocode}
Expand Down

0 comments on commit a1b3595

Please sign in to comment.