C Programming/C99 Reference/assert.h

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

[edit] Macros

[edit] Functions

The C99 standard requires no functions to be declared in the assert.h header.

[edit] Notes

The definition of the assert macro depends on the state of a macro, NDEBUG, which is not defined in the assert.h header. The macro NDEBUG denotes not using debugging information. If NDEBUG is defined, then assert is defined as an expression which does nothing. Otherwise assert will print debugging information if the expression it tests is false.