MathGroup Archive 2005

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

Search the Archive

Re: Leading Zeros?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54339] Re: [mg54319] Leading Zeros?
  • From: Sseziwa Mukasa <mukasa at jeol.com>
  • Date: Sat, 19 Feb 2005 02:31:39 -0500 (EST)
  • References: <200502171530.KAA02350@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Feb 17, 2005, at 10:30 AM, AES wrote:

> A quick test seems to show that if I enter as an input line
>
>    y = {001,002,003}; Print[y//FullForm];
>
> the output is List[1,2,3].
>
> Are the leading zeros gone forever?  Does Mathematica have an official
> policy on capturing or storing leading zeros?

To control the display of leading zeroes use PaddedForm

PaddedForm[y, 2, NumberPadding -> {"0", "0"}]

Regards,

Ssezi


  • Prev by Date: Re: Why does Inverse[M] hesitate?
  • Next by Date: Re: Finding extra digit
  • Previous by thread: Leading Zeros?
  • Next by thread: Re: Leading Zeros?