Files
mql5-skills/skills/mql5/references/book/01-basis/0090-basis-preprocessor-preprocessor-predefined.md
T
2026-06-23 21:47:51 +08:00

858 B

Predefined preprocessor constants

MQL5 has several predefined constants that are equivalent to simple macros, but they are defined by the compiler itself. The following table lists some of their names and meanings.

Name Description
COUNTER Counter (each mention in the text during macro expansion results in an increase of 1)
DATE Compilation date (day)
DATETIME Compilation date and time
FILE The name of the compiled file
FUNCSIG Current function signature
FUNCTION Current function name
LINE Line number in the compiled file
MQLBUILD, MQL5BUILD Compiler version
RANDOM Random number of type ulong
PATH Path to compiled file
_DEBUG Defined when compiling in debug mode
_RELEASE Defined when compiling in normal mode