Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

question of formatting with PaddedForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28556] question of formatting with PaddedForm
  • From: jabauer at oanet.com
  • Date: Fri, 27 Apr 2001 03:56:10 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello all,

I am having some difficulties getting a formatted output to look like I
'think' it should look. What I want looks like this (three digits, padded
with leading zeros for numbers less than 100):

098
099
100
101
102
103
104
105


But, when I try this:

For[i = 98, i <= 105,
  Print[PaddedForm[i, 2, NumberPadding -> {"0", "0"},
SignPadding ->
False]];
  i++]


I get this:

098
099
0100
0101
0102
0103
0104
0105


I only want three digits, not the extra leading zero for values >= 100. Can
anyone point me in the right direction? Thanks in advance.

        Jim

ps - I tried to post this a couple of days ago but it didn't show up.





 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse at newsone.net


  • Prev by Date: Not easy List transformation
  • Next by Date: Re: Mathematica and the Internet
  • Previous by thread: Not easy List transformation
  • Next by thread: Re: question of formatting with PaddedForm