Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: what's in a name? (legal and conventional constructions of identifiers)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119842] Re: what's in a name? (legal and conventional constructions of identifiers)
  • From: Michael Stern <nycstern at gmail.com>
  • Date: Sat, 25 Jun 2011 05:27:49 -0400 (EDT)

Also, you can't start a variable name with a number.  "happy1" is ok, 
but "1happy" is not.



On 6/24/2011 7:47 AM, Alan wrote:
> I find the documentation at http://reference.wolfram.com/mathematica/tutorial/DefiningVariables.html
> to be completely inadequate.  Is there a better place to look?
>
> Compare http://docs.python.org/reference/lexical_analysis.html#identifiers
>
> The main thing I want to understand is  i. what special keyboard characters are allowed, and ideally ii. what naming practices are conventional. I think the rough answer for the ASCII character set is that the $ is the only special character that is allowed, but you should not end a name with it. Is that right? (I'm aware of the camelCase convention.)
>
> Hints that are not in the above documentation but clearly should be are: do not use underscores in variable names, do not use subscripts in variable names (perhaps with a discussion of Symbolize), and do not end a variable name with $.
>
> Thanks,
> Alan
>
>
>


  • Prev by Date: Re: pattern example
  • Next by Date: Re: Assigning part of indexed object
  • Previous by thread: what's in a name? (legal and conventional constructions of identifiers)
  • Next by thread: Re: what's in a name? (legal and conventional constructions of identifiers)