How to Read Syntax Diagrams and Statements

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

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

Diagram example

syntax of a statement

A set of LibreOffice 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

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

Eit sett med LibreOffice Basic-uttrykk – med valfrie etikettars – brukar eit kolon : som skiljeteikn mellom dei. Det kan avsluttast med ein valfri merknad. REM eller ein apostrof (') innleiar ein merknad.

Eksempel:


       Sub Main
           GoTo there ' hopp over det første uttrykket
           here: Print 1, : there: Print 2 REM forklarande tekst her
       End Sub