Re: What characters are allowed in mathematica variable names? i.e. how

*To*: mathgroup at smc.vnet.net*Subject*: [mg126019] Re: What characters are allowed in mathematica variable names? i.e. how*From*: Jesse Perla <jesseperla at gmail.com>*Date*: Fri, 13 Apr 2012 04:47:28 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com

Thanks, Are there any characters that are simply in the ASCII set and hence won't expand to something complicated when I use a .m file or use mathematica on the commandline? -Jesse On Thu, Apr 12, 2012 at 8:16 AM, djmpark <djmpark at comcast.net> wrote: > Jesse, > > Here are several possibilities, which you can track down on the following > Help pages. > > guide/SpecialCharacters > guide/NonPrintingCharacters > ref/character/LetterSpace > guide/TextualForms > ref/character/UnderBracket > > my\[LetterSpace]first\[LetterSpace]variable > > my\[UnderBracket]first\[UnderBracket]variable > > These are both Symbols and can be used as variables. > > LetterSpace has the alias esc ls esc. > UnderBracket has the alias esc u[ esc. > > Here is another "special form" that can be used for primed and double > primed > symbols. > > x\:02b9 which gives x' > x\:02ba which gives x" > > These have the Head Symbol and can be used for variables. They are not > confused with derivatives and the primes are at the proper level. For some > reason no one seems to mind the lack of regular primed symbols in > Mathematics despite the fact that they are extremely common in the > mathematical literature. In any case, these particular forms are on the > Presentations Application palette. > > > David Park > djmpark at comcast.net > http://home.comcast.net/~djmpark/index.html > > > > > From: Jesse Perla [mailto:jesseperla at gmail.com] > > > In other languages like C++, _ is a kosher character to be in variable > names. It is not in mathematica, so things like "my_first_variable" don't > work. I have been using a ` to separate out the words to get things like > my`first`variable, but now realize it is creating other issues due to the > scoping it introduces. > > Are there are other characters I can use to separate out words in variable > names? > > Thanks > >