Identifier construction rules

An identifier is the name you give to a variable, a constant, a type, a class, a function, a sub, or a property.

The following rules govern the construction of identifiers in a script.

  • The first character must be an uppercase or lowercase letter.
  • The remaining characters must be letters, digits, or underscore ( _ ).
  • A data type suffix character (%, &, !, #, @, or $) can be appended, but is not part of the identifier.
  • The maximum length is 40 characters, not including the optional suffix character.
  • Names are case insensitive. For example, VerED is the same name as vered.
  • Characters with ANSI codes higher than 127 (those outside the ASCII range) are legal.

Escape character for illegal identifiers

Some IBM® software classes and OLE classes may define properties or methods whose identifiers use characters not legal in LotusScript® identifiers. Variables registered by IBM® software applications might also use such characters. In these cases, prefix the illegal character with a tilde (~) to make the identifier valid.

Examples

' $ is illegal as character in identifier
Call ProductClass.LoMethod$            ' Illegal           
Call ProductClass.LoMethod~$           ' Legal

X = OLEClass.Hi@Prop                   ' Illegal
X = OLEClass.Hi~@Prop                  ' Legal