MathGroup Archive 2005

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

Search the Archive

Re: Leading Zeros? (question rephrased)


In article <cv6sms$6p2$1 at smc.vnet.net>, AES <siegman at stanford.edu> 
wrote:

> Instead I'm asking, suppose I type
> 
>    y = {001,002,003}; 
> 
> into a newly opened "virgin" instance of Mathematica, without defining 
> any special formats or rules before I do this.  
> 
> Are the leading zeros that I type into this list captured and stored 
> somehow by Mathematica?  
> 
> Or is the default response that they're ignored and lost forever?  (As I 
> believe they are.) 

They are lost but they are not ignored -- they are definitely parsed. 
You can use $PreRead to see this:

  $PreRead = (Print[FullForm[#]]; #) &;

  {001,002,003}

(Note that the output you get depends upon whether the Input cell 
containing {001,002,003} is StandardForm, InputForm, or TraditionalForm).

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 6488 2734
School of Physics, M013                         Fax: +61 8 6488 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: Re: Mathematica 5 and Windows XP
  • Next by Date: Re: expression formatting inside tables
  • Previous by thread: Re: Leading Zeros? (question rephrased)
  • Next by thread: Labels on graphs