Identifiers
By:Gap
An identifier is used to refer to a variable (see Variables). An identifier usually consists of letters,
digits, and underscores _, and must contain at least one non-digit. An identifier is terminated by the
first character not in this class. Examples of valid identifiers are
a foo aLongIdentifier
hello Hello HELLO
x100 100x _100
some_people_prefer_underscores_to_separate_words
WePreferMixedCaseToSeparateWords
Note that case is significant, so the three identifiers in the second line are distinguished.
The backslash \ can be used to include other characters in identifiers; a backslash followed by a
character is equivalent to the character, except that this escape sequence is considered to be an
ordinary letter. For example
G\(2\,5\)
is an identifier, not a call to a function G.
An identifier that starts with a backslash is never a keyword, so for example \* and \mod are
identifiers.
The length of identifiers is not limited, however only the first 1023 characters are significant. The
escape sequence \newline is ignored, making it possible to split long identifiers over multiple lines.
• IsValidIdentifier( str ) F
returns true if the string str would form a valid identifier consisting of letters, digits and
underscores; otherwise it returns false. It does not check whether strcontains characters escaped by
a backslash \.
Reference : [Link]
Date:17-9-2008