MathGroup Archive 2002

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

Search the Archive

Re: Characters Allowed in Symbols

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37857] Re: Characters Allowed in Symbols
  • From: adam.smith at hillsdale.edu (Adam Smith)
  • Date: Fri, 15 Nov 2002 01:35:53 -0500 (EST)
  • References: <ar0102$b7k$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hermann,

This is an excellent question.  I hope someone has a comprehensive
list.  I personally have not seen one.  I do have one specific
example: the underline "_" character.

In my "ancient" FORTRAN computer codes I got in the habit of
representing some subscripts and spaces with the underline character
"_".

For example the inital time in many physics formula is given as t with
a zero subscript and I would use "t_0" to represent this.  In order to
set it equal to 10.0 seconds, I might have t_0 = 10.0 in the code.

Or if I wanted a long descriptive name like "approx Pi" assigned the
value 3.14, I would use approx_Pi = 3.14

Mathematica uses the "_" in representing patterns so these statements
generate error messages.  I vaguely remember someone providing a work
around, but I decided it was not worth the trouble and just learned to
avoid the "_" character.

Hope you find this helpful.

Adam Smith

"Hermann Schmitt" <schmitther at netcologne.de> wrote in message news:<ar0102$b7k$1 at smc.vnet.net>...
> Hello,
> On page 1000 of the Mathematica book you can read:
> "The name of a symbol must be a sequence of letters, letter-like symbols and
> digits".
> My question is: What letter-like forms are allowed?
> Apparently "$" is allowed, additionally, I found, that "§" is allowed.
> Are there yet other characters, which are allowed?
> My aim is to use symbols in my package, which do not interfere with symbols,
> which the user wants to define.
> Hermann Schmitt


  • Prev by Date: RE: How to generate synthetic econometric time series?
  • Next by Date: Re: RE: Joining lists
  • Previous by thread: Re: Characters Allowed in Symbols
  • Next by thread: RE: Characters Allowed in Symbols