Mathematica 9 is now available
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

Re: String to Number

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27289] Re: [mg27156] String to Number
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Sat, 17 Feb 2001 03:31:09 -0500 (EST)
  • References: <yzij6.3290$Rl5.31185@ralph.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

<steffenz at server2.fo.FH-Koeln.DE> wrote in message
news:yzij6.3290$Rl5.31185 at ralph.vnet.net...
> Dear Tomas,
>
> thank You for Your function, but the zeros are "deleted"
> automatically after conversion into a number.

Yes, of course they are. That is because when you perform this example --

> > makeNumbers["06:42"]

You get this:

> > Out[2]=
> > {6, 42}

There is no number "06." Numbers don't have leading zeros.

Maybe we are not understanding your question as you intend it.

In your original post, you asked this:

> > > I read a time from a file (this format  06:42) as a string.
> > >
> > > I would like to convert this string into to numbers (6 and 42).

The reply by Mr. Garza does this.

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: SubsetQ challenge
  • Next by Date: Re: Limit[ Sign[],x->Infinity ]
  • Previous by thread: Re: String to Number
  • Next by thread: Re: String to Number