Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #3285 > unrolled thread
| Started by | Alan <alan.isaac@gmail.com> |
|---|---|
| First post | 2011-06-24 11:54 +0000 |
| Last post | 2011-06-29 21:27 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
what's in a name? (legal and conventional constructions of identifiers) Alan <alan.isaac@gmail.com> - 2011-06-24 11:54 +0000
Re: what's in a name? (legal and conventional constructions of identifiers) Armand Tamzarian <mike.honeychurch@gmail.com> - 2011-06-29 21:27 +0000
| From | Alan <alan.isaac@gmail.com> |
|---|---|
| Date | 2011-06-24 11:54 +0000 |
| Subject | what's in a name? (legal and conventional constructions of identifiers) |
| Message-ID | <iu1tsu$9ma$1@smc.vnet.net> |
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
[toc] | [next] | [standalone]
| From | Armand Tamzarian <mike.honeychurch@gmail.com> |
|---|---|
| Date | 2011-06-29 21:27 +0000 |
| Message-ID | <iug5ce$9e0$1@smc.vnet.net> |
| In reply to | #3285 |
On Jun 24, 9:54 pm, Alan <alan.is...@gmail.com> wrote: > I find the documentation athttp://reference.wolfram.com/mathematica/tutorial/DefiningVariables.html > to be completely inadequate. Is there a better place to look? > > Comparehttp://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 Mathematica needs to handle subscripted variables much easier given that this is a "natural" way to define variables. I recently used another package where it was totally natural (out of the box, no loading packages etc.). It was quite a shock to see how further advanced they were in this area. Mike
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web