Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2001

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

Search the Archive

RE: ToString on object

  • To: mathgroup at
  • Subject: [mg28612] RE: [mg28565] ToString on object
  • From: "tgarza01 at" <tgarza01 at>
  • Date: Wed, 2 May 2001 03:37:04 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

The reason you get your result in alphabetical order is that Mathematica assumes that you are using symbols, since there is no way of knowing they are strings. Then a blank space means multiplication and the factors appear in alphabetical order, as you can see by looking at FullForm. It is only then that they are converted into strings. I suggest you wrap your input in quotation marks before applying ToString, i.e.,  
"bb aa, rr cc". Then you'll obtain the desired result.

Tomas Garza
Mexico City

Original Message:
From: merkat cabanc at
To: mathgroup at
Subject: [mg28612] [mg28565] ToString on object


I want a list of strings from a copied in line.

So I copied to my notebook from the clipboard the sequence:
  bb aa, rr cc 

What I get with ToString is the ordered sequence:  "aa bb" , "cc rr"
what I want go get is 
{"bb aa","rr cc"}

I guess that some use of Hold should help.
Can anybody help?


Mail2Web - Check your email from the web at .

  • Prev by Date: Re: LightYear Conversion is Incorrect in Units Package
  • Next by Date: Re: Non-linear programming in Mathematica
  • Previous by thread: RE: ToString on object
  • Next by thread: Re: Non-linear programming in Mathematica