This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Input and Output / Number Formatting /

Further Examples: PaddedForm

This uses zeros to pad both positive and negative numbers. Ordinarily, positive numbers have no sign character. An extra padding character is added to positive numbers to make sure that positive and negative numbers print with the same length.



Adding an explicit sign character for positive numbers avoids the extra padding character.



If you are printing only positive numbers and want them padded to the left with zeros for a total of exactly n digits, you can set the NumberSigns option to specify that no room will be needed for sign characters.