MathGroup Archive 2012

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

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126013] Re: What characters are allowed in mathematica variable names? i.e. how
  • From: "J. McKenzie Alexander" <jalex at lse.ac.uk>
  • Date: Fri, 13 Apr 2012 04:45:23 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204120635.CAA05439@smc.vnet.net>

I think any letter-like character can be used in variable names. See the following page in the documentation center discussing textual forms and letters and letter-like forms.

guide/TextualForms

tutorial/LettersAndLetterLikeForms

One character which basically does what you want is \[UnderParenthesis]. You can enter it quickly via ESC u( ESC. I just tried it out in Mathematica 8 and it can be used in variable names.

Cheers,

Jason

--
Dr J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE



On 12 Apr 2012, at 07:35, Jesse Perla wrote:

> 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 toseparate out words in variable names?
>
> Thanks
>


Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer



  • Prev by Date: Re: Replace each f in f^n to different variables
  • Next by Date: Re: Intersection problem
  • Previous by thread: What characters are allowed in mathematica variable names? i.e. how
  • Next by thread: Re: What characters are allowed in mathematica variable names? i.e. how