Příkaz Option Compatible
Option Compatible turns on the VBA-compatible Basic compiler mode at the module level. The function CompatibilityMode() controls runtime mode and affects all code executed after setting or resetting the mode.
Tato funkce může ovlivnit následující situace:
Allow special characters as identifiers.
Create constants including non-printable characters.
Podpora klíčových slov Private/Public pro procedury.
Povinný příkaz Set pro objekty.
Výchozí hodnoty nepovinných parametrů v procedurách.
Pojmenované parametry, pokud existuje více nepovinných parametrů.
Přednačítání knihoven LibreOffice Basic
Option Compatible je nutné použít při vytváření modulů tříd.
Option Compatible
CompatibilityMode() Function
CompatibilityMode() function is controlling runtime mode and affects all code executed after setting or resetting the mode. Option Compatible turns on VBA compatibility at module level for the LibreOffice Basic compiler.
Use this feature with caution, limit it to document conversion situations for example.
This function may affect or help in the following situations:
Creating enumerations with Enum statement
Updating Dir execution conditions
Running RmDir command in VBA mode
Changing behaviour of Basic Dir command
CompatibilityMode() function may be necessary when resorting to Option Compatible or Option VBASupport compiler modes.
CompatibilityMode(True | False)