Statement construction rules

  • The statements of a script are composed of lines of text. Each text element is a LotusScript® keyword, operator, identifier, literal, or special character.
  • The script can include blank lines without affecting the meaning.
  • The text on a line can begin at the left margin or be indented without affecting the meaning.
  • Within a statement, elements are separated with white space, either spaces or tabs. Extra white space can be used between elements to make a statement more readable without affecting the meaning. Avoid using white space around a special character appended to a name.
  • A statement, except for a block statement, must appear on a single line unless it includes the line-continuation character underscore ( _ ), preceded by white space.
  • The line-continuation character ( _ ) must appear at the end of a line to be continued, preceded by at least one space or tab. Only white space or inline comments (those preceded with an apostrophe) can follow the underscore on the line.
  • A new line marks the end of a statement. For block statements, the beginning of the next line starts a new statement.
  • Multiple statements on a line must be separated by a colon (:).

Example

' One statement on one line
Print "One line"
' One statement on two lines; extra white space
Print "One" & _    ' Comment allowed here
   "Two"
' Two statements on one line
Print "One" : Print "Two"