MathGroup Archive 2001

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

Search the Archive

Re: String to Number


<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: Re: Arrows on axes?
  • Next by Date: Re: Limit[ Sign[],x->Infinity ]
  • Previous by thread: Re: String to Number
  • Next by thread: memory management and pointers