Characters in names
Jeanne A. E. DeVoto
revolution at jaedworks.com
Sun Mar 20 21:39:02 EST 2005
At 12:44 AM +0000 3/21/05, Graham Samuel wrote:
>I can't find a list in the RR docs of legal characters for variable
>names. Obviously letters of the alphabet (at least the ascii
>version) and the numerals are OK, plus hyphen and underscore - but
>what else? Clearly no character used as an operator, like \ or +,
>can be legal, but maybe some others are: for example is period (full
>stop to me) permitted? If I've missed a complete list, can someone
>please point me at it?
This is from "About containers, variables, and sources of value":
Variable names
The names of variables must consist of a single word and may contain
any combination of letters, digits, and underscores (_). The first
character must be either a letter or an underscore.
Here are some examples of legal variable names:
someVariable
picture3
my_new_file
_output
Here are some names that cannot be used as variable names:
3rdRock -- starts with a digit
this&That -- "&" cannot be used
My Variable -- more than one word
Avoid giving a variable the same name as a custom property. If you
refer to a custom property, and there is a variable by the same name,
Revolution uses the contents of the variable as the name of the
custom property. Generally this will produce unexpected results.
Note: Global variables whose names begin with "gRev" are reserved
by the Revolution development environment.
(As Alex notes, there are characters other than letters, numbers, and
underscores that will work in variable names, but this isn't
guaranteed to go on working, so those characters are best avoided.)
--
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com
More information about the use-livecode
mailing list