Keywords

Oxygene, being Pascal-based, is a rich and expressive language that heavily relies on keywords over obscure syntaxes to express itself. In Oxygene, the following words are treated as keywords and have special meaning:

Legacy Keywords

  • asm — started a block of assembly code (not supported by Oxygene, but respected by the compiler for compatibility)
  • forwardForward Declarations for Global Methods
  • function — alias for method (but must have a return type)
  • gotoGo To Statements
  • procedure — alias for method (but must not have a return type)

Delphi Compatibility

The following keywords are only active when Delphi Language Compatibility is enabled:

  • cdecl — method calling convention modifier (honored for external methods only)
  • create — allows calling Constructors using ".Create"
  • destructor — allows defining a Delphi-style "destructor Destroy"
  • finalize — allows calling Finalizers using ".Finalize"
  • helper — allows declaring Extensions using class helper for or record helper for
  • library — warning directive for platform-specific code (ignored)
  • otherwise — alias for else in FPC-compatible case Statements
  • overload — member modifier, ignored (Oxygene allows overloading implicitly)
  • packed — modifier for Records, ignored
  • pascal — method calling convention modifier (ignored/the default)
  • platform — warning directive for platform-specific code (ignored)
  • reference to — marks a function pointer as Block (ignored)
  • register — method calling convention modifier (ignored, but not supported)
  • safecall — method calling convention modifier (ignored, but not supported)
  • stdcall — method calling convention modifier (honored for external methods only)
  • strict — declares a static methods w/o access to the class metadata (ignored)