Compiler directives: #compile


#compile[+|*] "macro"



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



+ 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).



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.



#compile "toolhelp"