Compiler directives: #compile

Syntax

#compile[+|*] "macro"

 

Parameters

macro - name of a macro or function. Also can be sub-function, like "sub.SubName".

 

Options:

+ macro is folder. Compiles all items in it. If macro is "sub", compiles all sub-functions.
*

compile and execute.

  • macro must be user-defined function or sub-function. It runs while compiling, in QM main thread.
  • This is useful if you want to set global or environment variables that are used later while compiling current macro (with #if, etc).

 

Remarks

Compiles macro. It does not "include" or call it, but just compiles, if it is not already compiled. Usually it is used to compile macros or functions that contain various declarations.

 

See also: ref, CompileAllItems.

 

Example

#compile "toolhelp"