MathGroup Archive 2003

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

Search the Archive

RE: symbols to separate characters in a variable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42066] RE: [mg42059] symbols to separate characters in a variable
  • From: "David Park" <djmp at earthlink.net>
  • Date: Wed, 18 Jun 2003 02:10:30 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

David,

The straight underscore is used to designate patterns in Mathematica and so
can't be used as a character in a Symbol name.

You could use the UnderBracket from the CompleteCharacters palette under
Letter Like Forms, Textual Forms. It can also be entered by esc u[ esc. or
by \[UnderBracket].

You may not find it worth all the typing. Rather than using spacing under
brackets, Mathematica programmers tend to use long names, such as
vehicleSpeed.

In any case you should be aware of the command completion feature of
Mathematica. Once you have used a symbol such as ab\[UnderBracket]cd, or
vehicleSpeed, Mathematica remembers it. Then if you type ab Ctrl K,
Mathematica will complete the name if it is the only symbol starting with
ab, or it will give you a list of all the symbols starting with ab to choose
from.

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

From: cyberdude [mailto:quake_earthNOSPAM at hotmail.com]
To: mathgroup at smc.vnet.net

Hi,

In mathematica, I try to separate characters in a variable by '_' but
that seems to be problematic.  For example,


In[1]:= ab_cd=1

Set::patset: Warning: ab_cd in assignment ab_cd = 1
     represents a named pattern; use symbol::tag to represent a message
name.


In[2]:= ab_cd



ab_cd in In[2] doesn't return 1.  It looks like a problem.  Can it be
overcome?

Are there other symbols that can separate characters in a variable to let
the characters look 'not packed closely together'?  Thank you in advance.


David



  • Prev by Date: Re: ack! simple partitioning problem making my head swim....
  • Next by Date: Re: ack! simple partitioning problem making my head swim....
  • Previous by thread: symbols to separate characters in a variable
  • Next by thread: Re: symbols to separate characters in a variable