Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9605

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

From Ray Koopman <koopman@sfu.ca>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: What characters are allowed in mathematica variable names? i.e. how
Date 2012-04-13 08:58 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jm8prd$j2n$1@smc.vnet.net> (permalink)
References <jm64l6$6lq$1@smc.vnet.net>

Show all headers | View raw


On Apr 12, 1: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?

No. The "solution" is camelCase: in multiWordNames,
capitalize the initial letter of each word except the first.
(If you capitalize the initial letter of the first word too
then your name may conflict with a built-in symbol.)

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


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