Re: What characters are allowed in mathematica variable names? i.e. how
- To: mathgroup at smc.vnet.net
- Subject: [mg126050] Re: What characters are allowed in mathematica variable names? i.e. how
- From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
- Date: Fri, 13 Apr 2012 04:58:13 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.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 You will be safe capitalizing the first characters of the words in the names of variables. For instance, myFirstVariable. Do not use the sign $ as the initial letter in the variable name, do not use arithmetical and logical signs: *,+,- /, & and && to connect parts of the variable name, or to begin it. Have fun, Alexei Alexei BOULBITCH, Dr., habil. IEE S.A. ZAE Weiergewan, 11, rue Edmond Reuter, L-5326 Contern, LUXEMBOURG Office phone : +352-2454-2566 Office fax: +352-2454-3566 mobile phone: +49 151 52 40 66 44 e-mail: alexei.boulbitch at iee.lu