MathGroup Archive 2002

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

Search the Archive

RE: Characters Allowed in Symbols

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37844] RE: [mg37839] Characters Allowed in Symbols
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Fri, 15 Nov 2002 01:34:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

>-----Original Message-----
>From: Hermann Schmitt [mailto:schmitther at netcologne.de]
To: mathgroup at smc.vnet.net
>Sent: Thursday, November 14, 2002 12:12 PM
>To: mathgroup at smc.vnet.net
>Subject: [mg37844] [mg37839] Characters Allowed in Symbols
>
>
>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
>
>

Hermann,

here I entered a few (obviously) "letter-like forms" from the palette
Complete Characters:

In[1]:=
{a, \[Alpha], \[ScriptA], \[GothicA], \[DoubleStruckA], à, \[Angstrom], \
\[Wolf], EUR, \[DotlessI], ?, \[UnderBrace], \[AltKey]}

In[2]:= Names["Global`*"]
Out[2]=
{"a", "à", "\[DotlessI]", "\[ScriptA]", "\[GothicA]", "\[DoubleStruckA]", "\
\[Alpha]", "\[AltKey]", "\[Angstrom]", "?", "EUR", "\[Wolf]",
"\[UnderBrace]"}

In[3]:= nnames = %

In[4]:= inputs = %%%

In[5]:= NameQ /@ nnames
Out[5]=
{True, True, True, True, True, True, True, 
 True, True, True, True, True, True}

In[6]:= Sort[inputs] === Symbol /@ nnames
Out[6]= True

In[8]:= MapThread[Set, {inputs, Range[Length[nnames]]}]
Out[8]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}

In[9]:= Symbol /@ nnames
Out[9]= {1, 6, 10, 3, 4, 5, 2, 13, 7, 11, 9, 8, 12}

In[10]:= ?*\[AltKey]/\[DoubleStruckA]/EUR*\[Wolf]
Out[10]= 1144/45

So, as I cannot precisely answer your question, I'd say: quite a lot. My
guess is: all stuff under "Letters" and most under "Letter-like Forms",
which is not predefined and protected, that is. It should not be too
difficult to find out for a case given.


--
Hartmut Wolf


P.S.: After all, this is determined by the Mathematica Parser, so my guess
above might not be a 100% correct. 



  • Prev by Date: Re: RE: Joining lists
  • Next by Date: RE: RE: Joining lists
  • Previous by thread: Re: Characters Allowed in Symbols
  • Next by thread: Re: Characters Allowed in Symbols