summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/expl3/l3num.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-31 00:04:47 +0000
committerKarl Berry <karl@freefriends.org>2010-03-31 00:04:47 +0000
commit3ab55a61f6f8d2218a8f3175bc7481ce162b60d3 (patch)
treef606e0c2117a8058213441400e50ba25400ba94a /Master/texmf-dist/source/latex/expl3/l3num.dtx
parent035ea73193af75f6ade46e306603e61d82b24950 (diff)
expl3 1881 (30mar10)
git-svn-id: svn://tug.org/texlive/trunk@17631 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3num.dtx')
-rw-r--r--Master/texmf-dist/source/latex/expl3/l3num.dtx35
1 files changed, 15 insertions, 20 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3num.dtx b/Master/texmf-dist/source/latex/expl3/l3num.dtx
index 138acc0f3cf..a17b7768cc5 100644
--- a/Master/texmf-dist/source/latex/expl3/l3num.dtx
+++ b/Master/texmf-dist/source/latex/expl3/l3num.dtx
@@ -1,5 +1,5 @@
% \iffalse
-%% File: l3num.dtx Copyright (C) 2005-2009 Frank Mittelbach, LaTeX3 project
+%% File: l3num.dtx Copyright (C) 2005-2010 Frank Mittelbach, LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -36,7 +36,7 @@
\RequirePackage{l3names}
%</driver|package>
%\fi
-\GetIdInfo$Id: l3num.dtx 1451 2009-08-08 06:33:34Z joseph $
+\GetIdInfo$Id$
{L3 Experimental token numbers}
%\iffalse
%<*driver>
@@ -271,11 +271,6 @@
% These are the \TeX{} primitives \tn{ifcase} and \tn{or}.
% \end{texnote}
% \end{function}
-%
-%^^A Keep the documenation-checking happy
-%\ExplSyntaxOn
-%\seq_gput_right:Nx \g_doc_macros_seq { \token_to_str:N \or: }
-%\ExplSyntaxOff
%
% \end{documentation}
%
@@ -299,8 +294,8 @@
% Here are the remaining primitives for number comparisons and
% expressions.
% \begin{macrocode}
-\cs_new_eq:NN \if_num:w \tex_ifnum:D
-\cs_new_eq:NN \if_case:w \tex_ifcase:D
+\cs_set_eq:NN \if_num:w \tex_ifnum:D
+\cs_set_eq:NN \if_case:w \tex_ifcase:D
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -315,10 +310,10 @@
% Incrementing and decrementing of integer registers is done with
% the following functions.
% \begin{macrocode}
-\cs_set_nopar:Npn \num_incr:N #1{\num_add:Nn#1 1}
-\cs_set_nopar:Npn \num_decr:N #1{\num_add:Nn#1 \c_minus_one}
-\cs_set_nopar:Npn \num_gincr:N #1{\num_gadd:Nn#1 1}
-\cs_set_nopar:Npn \num_gdecr:N #1{\num_gadd:Nn#1 \c_minus_one}
+\cs_set_protected_nopar:Npn \num_incr:N #1{\num_add:Nn#1 1}
+\cs_set_protected_nopar:Npn \num_decr:N #1{\num_add:Nn#1 \c_minus_one}
+\cs_set_protected_nopar:Npn \num_gincr:N #1{\num_gadd:Nn#1 1}
+\cs_set_protected_nopar:Npn \num_gdecr:N #1{\num_gadd:Nn#1 \c_minus_one}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -347,8 +342,8 @@
% \begin{macro}{\num_gzero:c}
% We also need \ldots
% \begin{macrocode}
-\cs_new_nopar:Npn \num_zero:N #1 {\num_set:Nn #1 0}
-\cs_new_nopar:Npn \num_gzero:N #1 {\num_gset:Nn #1 0}
+\cs_new_protected_nopar:Npn \num_zero:N #1 {\num_set:Nn #1 0}
+\cs_new_protected_nopar:Npn \num_gzero:N #1 {\num_gset:Nn #1 0}
% \end{macrocode}
%
% \begin{macrocode}
@@ -366,7 +361,7 @@
% \begin{macro}{\num_new:c}
% Allocate a new \m{num} variable and initialize it with zero.
% \begin{macrocode}
-\cs_new_nopar:Npn \num_new:N #1{\tl_new:Nn #1{0}}
+\cs_new_protected_nopar:Npn \num_new:N #1{\tl_new:Nn #1{0}}
\cs_generate_variant:Nn \num_new:N {c}
% \end{macrocode}
% \end{macro}
@@ -378,14 +373,14 @@
% \begin{macro}{\num_gset:cn}
% Assigning values to \m{num} registers.
% \begin{macrocode}
-\cs_new_nopar:Npn \num_set:Nn #1#2{
+\cs_new_protected_nopar:Npn \num_set:Nn #1#2{
\tl_set:No #1{ \tex_number:D \intexpr_eval:n {#2} }
}
\cs_generate_variant:Nn\num_set:Nn {c}
% \end{macrocode}
%
% \begin{macrocode}
-\cs_new_nopar:Npn \num_gset:Nn {\pref_global:D \num_set:Nn}
+\cs_new_protected_nopar:Npn \num_gset:Nn {\pref_global:D \num_set:Nn}
\cs_generate_variant:Nn\num_gset:Nn {c}
% \end{macrocode}
% \end{macro}
@@ -428,12 +423,12 @@
% Adding is easily done as the second argument goes through
% |\intexpr_eval:n|.
% \begin{macrocode}
-\cs_new_nopar:Npn \num_add:Nn #1#2 {\num_set:Nn #1{#1+#2}}
+\cs_new_protected_nopar:Npn \num_add:Nn #1#2 {\num_set:Nn #1{#1+#2}}
\cs_generate_variant:Nn\num_add:Nn {c}
% \end{macrocode}
%
% \begin{macrocode}
-\cs_new_nopar:Npn \num_gadd:Nn {\pref_global:D \num_add:Nn}
+\cs_new_protected_nopar:Npn \num_gadd:Nn {\pref_global:D \num_add:Nn}
\cs_generate_variant:Nn\num_gadd:Nn {c}
% \end{macrocode}
% \end{macro}