Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9600
| From | David Reiss <dbreiss@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: What characters are allowed in mathematica variable names? i.e. how |
| Date | 2012-04-13 08:55 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jm8pmk$j0g$1@smc.vnet.net> (permalink) |
| References | <jm64l6$6lq$1@smc.vnet.net> |
For your main issue -- how to make your variables readable -- simply use camel case: I.e., myFirstVariable or MyFirstVariable. However, remember that Mathematica uses camel case for all of its parameters, with the key convention that all of them begin with a capital character. So, if you begin yours with a lowercase character you will not encounter name conflicts. If you do start with an Uppercase character then you need to be careful that you are not encountering such conflicts. --David On Apr 12, 4:44 am, Jesse Perla <jessepe...@gmail.com> 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 to separate out words in variable names? > > Thanks
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What characters are allowed in mathematica variable names? i.e. how Jesse Perla <jesseperla@gmail.com> - 2012-04-12 08:44 +0000 Re: What characters are allowed in mathematica variable names? i.e. how Yi Wang <tririverwangyi@gmail.com> - 2012-04-13 08:54 +0000 Re: What characters are allowed in mathematica variable names? i.e. how David Reiss <dbreiss@gmail.com> - 2012-04-13 08:55 +0000 Re: What characters are allowed in mathematica variable names? i.e. how Ray Koopman <koopman@sfu.ca> - 2012-04-13 08:58 +0000
csiph-web