Special characters

LotusScript® uses special characters, such as punctuation marks, for several purposes:

  • To delimit literal strings
  • To designate variables as having particular data types
  • To punctuate lists, such as argument lists and subscript lists
  • To punctuate statements
  • To punctuate lines in a script

Note: Special characters within literal strings are treated as ordinary text characters.

The following table summarizes the special characters used in LotusScript®:

Character

Usage

"

(quotation mark)

Opening and closing delimiter for a literal string on a single line.

|

(vertical bar)

Opening and closing delimiter for a multi-line literal string. To include a vertical bar in the string, use double bars ( || ).

{ }

(braces)

Delimits a multi-line literal string. To include an open brace in the string, use a single open brace ({). To include a close brace in the string, use double close braces (}}).

:

(colon)

  1. Separates multiple statements on a line.
  2. When following an identifier at the beginning of a line, designates the identifier as a label.

$

(dollar sign)

  1. When suffixed to the identifier in a variable declaration or an implicit variable declaration, declares the data type of the variable as String.
  2. When prefixed to an identifier, designates the identifier as a product constant.

%

(percent sign)

  1. When suffixed to the identifier in a variable declaration or an implicit variable declaration, declares the data type of the variable as Integer.
  2. When suffixed to either the identifier or the value being assigned in a constant declaration, declares the constant's data type as Integer.
  3. Designates a compiler directive, such as %Rem or %If.

&

(ampersand)

  1. When suffixed to the identifier in a variable declaration or an implicit variable declaration, declares the data type of the variable as Long.
  2. When suffixed to either the identifier or the value being assigned in a constant declaration, declares the constant's data type as Long.
  3. Prefixes a binary (&B), octal (&O), or hexadecimal (&H) number.
  4. Designates the string concatenation operator in an expression.

!

(exclamation point)

  1. When suffixed to the identifier in a variable declaration or an implicit variable declaration, declares the data type of the variable as Single.
  2. When suffixed to either the identifier or the value being assigned in a constant declaration, declares the constant's data type as Single.

#

(pound sign)

  1. When suffixed to the identifier in a variable declaration or an implicit variable declaration, declares the data type of the variable as Double.
  2. When suffixed to either the identifier or the value being assigned in a constant declaration, declares the constant's data type as Double.
  3. When prefixed to a literal number or a variable identifier, specifies a file number in certain file I/O statements and functions.

@

(at sign)

  1. When suffixed to the identifier in a variable declaration or an implicit variable declaration, declares the data type of the variable as Currency.
  2. When suffixed to either the identifier or the value being assigned in a constant declaration, declares the constant's data type as Currency.

* (asterisk)

  1. Specifies the string length in a fixed-length string declaration.
  2. Designates the multiplication operator in an expression.

(1) Specifies the string length in a fixed-length string declaration.

(2) Designates the multiplication operator in an expression.

( )

(parentheses)

  1. Groups an expression, controlling the order of evaluation of items in the expression.
  2. Encloses an argument in a sub or function call that should be passed by value.
  3. Encloses the argument list in function and sub definitions, and in calls to functions and subs.
  4. Encloses the array bounds in array declarations, and the subscripts in references to array elements.
  5. Encloses the list tag in a reference to a list element.

. (period)

  1. When suffixed to a type variable or an object reference variable, references members of the type or object.
  2. As a prefix in a product object reference, designates the selected product object.
  3. As a prefix in an object reference within a With statement, designates the object referred to by the statement.
  4. Designates the decimal point in a floating-point literal value.

..

(two periods)

Within a reference to a procedure in a derived class that overrides a procedure of the same name in a base class, specifies the overridden procedure.

[ ]

(brackets)

Delimit names used by certain IBM® software applications to identify product objects.

, (comma)

  1. (1) Separates arguments in calls to functions and subs, and in function and sub definitions.
  2. Separates bounds in array declarations, and subscripts in references to array elements.
  3. Separates expressions in Print and Print # statements.
  4. Separates elements in many other statements.

; (semicolon)

Separates expressions in Print and Print # statements.

' (apostrophe

Designates the beginning of a comment. The comment continues to the end of the current line.

_ (underscore)

When preceded by at least one space or tab, continues the current line to the next line.

Note: Use white space to separate names and keywords, or to make the use of a special character unambiguous. White space is not needed with most non-alphanumeric operators. Avoid using white space around a special character, such as a data type suffix character appended to a name.