MathGroup Archive 2005

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

Search the Archive

Re: Converting from string to integer


On 4/23/05 at 1:16 AM, norge20_ at hotmail.com (Magnus) wrote:

>I have strings consisting of numbers. Now; how do I make them all
>of integer type?

>Ex: "0123" ---> 123

Probably the simplest is to use ToEpression, i.e.,

In[1]:=ToExpression["0123"]
Out[1]=123

Another approach would be to use ReadList with StringToStream, i.e.,

In[2]:=First@ReadList[StringToStream["0123"], Number]
Out[2]=123
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Re: A bug in Integrate ?
  • Next by Date: Re: Re: SpinShow problem
  • Previous by thread: Re: Converting from string to integer
  • Next by thread: Re: Converting from string to integer