Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: ToExpression[ToString[expr]]=E2=89 _expr

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109977] Re: ToExpression[ToString[expr]]=E2=89 _expr
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 27 May 2010 06:44:06 -0400 (EDT)

You don't want OutputForm as the input to ToString

ToString[1/3] // FullForm

"1\n-\n3"

ToExpression[ToString[#[1/3]]] & /@
 {InputForm, StandardForm,
  TraditionalForm, OutputForm}

{1/3, 1/3, 1/3, -3}


Bob Hanlon

---- James Stein <mathgroup at stein.org> wrote: 

=============
Evaluating:

   ToExpression [ ToString [ 1/3 ] ]

I did not expect negative three!

Bug? or a lack in my understanding?




  • Prev by Date: Re: ProgressIndicator inside DynamicModule
  • Next by Date: Re: ToExpression[ToString[expr]]=E2=89 _expr
  • Previous by thread: ToExpression[ToString[expr]]=E2=89 _expr
  • Next by thread: Re: ToExpression[ToString[expr]]=E2=89 _expr