Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: type casting

  • To: mathgroup at
  • Subject: [mg39844] Re: type casting
  • From: "Steve Luttrell" <luttrell at>
  • Date: Sat, 8 Mar 2003 02:51:15 -0500 (EST)
  • References: <b49nga$fef$>
  • Sender: owner-wri-mathgroup at

You can do lots of useful things with ToExpression, which takes any string
and converts it into the corresponding Mathematica expression. For instance.
ToExpression["1.23"] will return the real number 1.23, and
ToExpression["2/7"] will return the rational number 2/7, and so on. You can
then manipulate and output these expressions in any way that you please.

Steve Luttrell
West Malvern, UK

"Tolonen, Ellen N" <entolonen at> wrote in message
news:b49nga$fef$1 at
> Hello.
> I am I new Mathematica user and am trying to master input/output.  Is
> any way to type cast a string into number format?
> Ellen Tolonen
> entolonen at

  • Prev by Date: AW: type casting
  • Next by Date: Re: type casting
  • Previous by thread: Re: type casting
  • Next by thread: exporting an expression which is readable in fortran 77