Compiler Directives

Syntax

CompilerIf  <constant expression>
  ...
[CompilerElse]
  ...
CompilerEndIf

Description

If the <constante expression> result is true, the code inside the 'If' will be compiled, else it will be totally ignored. It's useful when building multi-OSes programs to
customize some programs part by using OS specific functions.

Example :

CompilerIf #OS = #Linux
  ; some Linux specific code..
CompilerEndIf

Syntax

CompilerSelect  <numeric number>
  CompilerCase
    ...
  [CompilerElse]
    ...
  [CompilerDefault]
    ...
CompilerEndSelect

Description

Works exactly like a regular Select : EndSelect but will tell the compiler which code should be compiled. It's useful when building multi-OSes programs to customize some programs part by using OS specific functions.

Example :

CompilerSelect #OS
  CompilerCase #AmigaOS
    ; some Amiga specific code
  CompilerCase #Linux
; some Linux specific code CompilerEndSelect