Conteúdo
Índice 🔎︎

# Compiler Options, Runtime Conditions

Compiler options specified at the module level affect LibreOffice Basic compiler checks and error messages. Basic syntax as well as Basic set of instructions can be different according to the options that are in use. The less Option, the easiest and tolerant LibreOffice Basic language is. The more Option, the richer and controlled Basic language gets.

Compiler options must be specified before the executable program code in a module.

### Sintaxe:

## Instrução Option Base

Define o limite inferior padrão para matrizes como 0 ou 1.

## Option ClassModule Statement

Specifies that the module is a class module that contains members, properties, procedures and functions.

## Option Compatible Statement

Option Compatible turns on the VBA-compatible Basic compiler mode at the module level.

## CompatibilityMode() Function

CompatibilityMode() function is controlling runtime mode and affects all code executed after setting or resetting the mode.

## Instrução Option Explicit

Especifica que cada variável no código do programa terá de ser definida de forma explícita através da instrução Dim.

## Option Private Module

Specifies that the scope of the module is that of the Basic library it belongs to.

## Instrução Option VBASupport

Especifica que o LibreOffice Basic terá suporte a algumas instruções, funções e objetos VBA.

Options specified at the module level also affect LibreOffice Basic runtime conditions. The behaviour of LibreOffice Basic instructions can differ.

Tópicos relacionados

Property statement

Exclusive VBA Functions and Statements

Err Object [VBA]