Compiler directives: #set

Syntax

#set variable value

 

Parameters

variable - global variable of type int.

value - an integer value to assign. Can be simple number, global int variable, or user-defined function without arguments (runs at compile time in QM main thread). Sub-functions also supported.

 

Remarks

Sets value of a global int variable at compile time. The variable must exist.

 

See also: #compile

 

Examples

 create, set and use global variable at compile time
int+ g_var
#set g_var GetGVar
#if g_var