%%% Multi-signed numbers

% \TeX\ handles multiple signs properly:

\newdimen\scratchdimen
\scratchdimen 1pt \the\scratchdimen,
\scratchdimen -1pt \the\scratchdimen,
\scratchdimen --1pt \the\scratchdimen,
\scratchdimen ---1pt \the\scratchdimen,
\scratchdimen -+-+-+++-----+1pt \the\scratchdimen,

% So, there never is a need to use an intermediate variable to negate a value. All
% digits, $+$/$-$ signs and units can be faked in macros:

\def\neg{-} \def\p{p}
\scratchdimen \neg\space\neg\space\space00001\empty\p\empty\empty tttt \the\scratchdimen

% One may also notice that white characters are allowed between multiple signs
% (but not between digits!), leading zeros are ignored, and the unit is
% properly interpreted regardless of the very next character.

\end
