OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Using Preprocessor Symbols

Three preprocessor symbols control diagnostic macro expansion: __DEBUG, __TRACE, and __WARN.

If one of these symbols is defined when compiling, then the corresponding macros expand and diagnostic code is generated. If none of these symbols is defined, then the macros do not expand and no diagnostic code is generated. These symbols can be defined on the command line using the -D switch, or by using #define statements within your code.

#define __TRACE
Definition checks.cpp:22
#define CHECK(condition)
Definition checks.h:239
#define WARNX(group, condition, level, message)
Definition checks.h:277
#define TRACE(message)
Definition checks.h:255
#define WARN(condition, message)
Definition checks.h:273
#define PRECONDITION(condition)
Definition checks.h:227
#define CHECKX(condition, message)
Definition checks.h:245
#define PRECONDITIONX(condition, message)
Definition checks.h:231
#define __DEBUG
Definition checks.h:204
#define TRACEX(group, level, message)
Definition checks.h:263

To create a diagnostic version of an executable, place the diagnostic macros at strategic points within the program code and compile with the appropriate preprocessor symbols defined. Diagnostic versions of the Borland class libraries are built in a similar manner.