C Programming/assert.h/Function reference
assert macro returns a
void, i.e. no value.
The behaviour of the
assert macro depends on the value of the
NDEBUG macro. See assert.h for more details.
NDEBUG is defined then the macro
assert, regardless of argument, is defined as
#define assert(expression) ((void) 0)
NDEBUG is not defined the
assert macro acts as a diagnostic test. If the
expression argument of the macro is false (see C Programming/Control), then the macro expands to a statement which writes the text of the argument, the present file name, line number and function name to the standard error stream. Finally the
assert macro calls the
Each time the
assert.h header is included the
assert macro is redefined depending on the value of