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: [mg109990] Re: ToExpression[ToString[expr]]=E2=89 _expr
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Thu, 27 May 2010 06:46:32 -0400 (EDT)

On 5/26/10 at 7:10 AM, mathgroup at stein.org (James Stein) wrote:

>Evaluating:

>ToExpression [ ToString [ 1/3 ] ]

>I did not expect negative three!

>Bug? or a lack in my understanding?

Do ToCharacterCode[ToString[1/3]] and you will find the
character code for 1, - and 3 all followed by line termination
characters. On Unix or Mac OS this is a line feed character and
possibly different on Windows. In any case, this is seen as an
implicit multiply yielding -3.



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