MathGroup Archive 2005

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

Search the Archive

Re: String[bring] vs "bring"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59371] Re: [mg59350] String[bring] vs "bring"
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 7 Aug 2005 03:47:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Kris,

String is the Head of string objects but it is not a command that does
anything.

In[1]:=
String[bring]

Out[1]=
String[bring]

I think you want to use ToString.

ToString[bring] // FullForm
"bring"

"bring" == ToString[bring]
True

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




From: Kristen W Carlson [mailto:carlsonkw at gmail.com]
To: mathgroup at smc.vnet.net


Hi,

Question: What is the difference between "bring" and String[bring] ?
What is the utility of making them different?

Question: What is the difference between "bring" and String[bring] ?
What is the utility of making them different?

"bring" ===String[bring]

False

Cases[{"bring"}, _String]

{bring}

Cases[String[bring], _String]

{}

Cases[ToString[bring], _String]

{}

InputForm[String[bring]]

String[bring]

InputForm["bring"]

"bring"

FullForm[String[bring]]

String[bring]

And yet:

Head["bring"]

String

FullForm["bring"]

"bring"

ToString[bring]

bring

InputForm[%]

"bring"

Wha????

Thanks,

Kris



  • Prev by Date: Re: running notebook from command line...
  • Next by Date: Re: coefficient of a polynomial term
  • Previous by thread: Re: String[bring] vs "bring"
  • Next by thread: Re: String[bring] vs "bring"