MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

NumberPadding on the left

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82819] NumberPadding on the left
  • From: zac <replicatorzed at gmail.com>
  • Date: Wed, 31 Oct 2007 06:23:30 -0500 (EST)

Dear Group,

I have the following code:

PaddedForm[{.1, 1, 11, 111}, {5, 3}, NumberPadding -> {"0", "0"}]

which returns: {000.100, 001.000, 011.000, 0111.000}

Obviously, I do not want the leftmost 0 in case of the last entry 111.
What I want is to have exactly 6 digits, where 3 digits is always on
the right side of the decimal point. I know I can convert all the
entries to string and than pad them from the left, but this does not
tell me why the last number here (111) is padded from the left.
Any suggestion?

Istvan Zachar



  • Prev by Date: Re: Issue with Locator's crosshairs object
  • Next by Date: Re: Easy Mapping problem that has me stumped!
  • Previous by thread: ReadList -- file size limits?
  • Next by thread: ANN: ColorbarPlot