Re: Leading Zeros? (question rephrased)
- To: mathgroup at smc.vnet.net
- Subject: [mg54412] Re: [mg54378] Leading Zeros? (question rephrased)
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sun, 20 Feb 2005 00:08:33 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200502190732.CAA06154@smc.vnet.net>
- Reply-to: murray at math.umass.edu
- Sender: owner-wri-mathgroup at wolfram.com
The "ultimate authority" on what Mathematica does -- Mathematica itself
-- answers your question:
FullForm[001]
1
FullForm[Hold[001]]
1
So for the purposes of you application, it seems you want to deal with
text strings, but convert them to/from integer digits where needed or
possibly just pull out the individual characters and compare those.
AES wrote:
> ...I'm asking, suppose I type
>
> y = {001,002,003};
>
> ... 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.)
>
> -------------
>
> P.S. -- I'm not trying to argue what Mathematica should do, either way.
> I'm just trying to learn whether Mathematica in particular, or
> mathematics or computer science generally, has any "official policies"
> on capturing or storing leading zeros that a user may type in, or that
> may be loaded into a database.
>
> The question arises in part because there's a scientific journal that
> identifies articles by "article numbers" rather than page numbers, with
> the initial digit of the article number sometimes being zero and
> sometimes non-zero, and the zero when it's present being mandatory (at
> least for some purposes). This number, moreover, is treated for some
> purposes as a numerical value, though it's obviously also in some ways a
> "text label" rather than a numerical value.
>
> Seem to me this is not a particularly wise design decision (although
> it's the case for ZIP codes also), and I'm wondering if there's any
> computer science thinking on it.]
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Leading Zeros? (question rephrased)
- From: AES <siegman@stanford.edu>
- Leading Zeros? (question rephrased)