Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

How to Read Syntax Diagrams and Statements

Office Basic statements use syntax diagrams and textual conventions that follow these typographical rules:

  • Office Basic keywords or functions use proper casing: Call, DimArray, InputBox, Property.
  • Lowercase characters indicate information to supply: end, expression, start, variable.

The syntax of a Office Basic one line statement is illustrated herewith:

Diagram example

  • Basic statement diagrams start and end with double vertical bars,
  • Loops indicate a possible repetition, an optional separator may be present,
  • Rectangles denote subsequent diagram fragments,
  • Diagram fragments extremities exhibit single vertical bars.

syntax of a statement

A set of Office Basic statements - with optional labels - is using a colon : sign to separate them, it can be terminated with an optional comment. REM or an apostrophe sign introduce a comment.

diagram fragment

Textual example

  • [opt1|opt2|opt3] Items inside brackets are optional, alternatives are indicated with a vertical bar,
  • case[[sep]…] An ellipsis indicates a possible repetition, an optional separator may be specified,
  • {choice1|choice2} Items inside curly braces are compulsory, alternatives are indicated with a vertical bar.

[ [label:] statement [: …] ] [{REM|'} text]

A set of Office Basic statements - with optional labels - is using a colon : sign to separate them, it can be terminated with an optional comment. REM or an apostrophe sign introduce a comment.

Example:


       Sub Main
           GoTo there ' skip first statement
           here: Print 1, : there: Print 2 REM explanatory text here
       End Sub