B.6 Diagnostics: <assert.h>

The assert macro is used to add diagnostics to programs:

If expression is zero when

is executed, the assert macro will print on stderr a message, such as

It then calls abort to terminate execution. The source filename and line number come from the preprocessor macros __FILE__ and __LINE__.

If NDEBUG is defined at the time <assert.h> is included, the assert macro is ignored.

TCPL/B.06_Diagnostics:_<assert.h> (last edited 2008-02-23 15:37:02 by localhost)

ch3n2k.com | Copyright (c) 2004-2022 czk.