ASSERT(3,L) AIX Technical Reference ASSERT(3,L)
-------------------------------------------------------------------------------
assert
PURPOSE
Verifies a program assertion.
LIBRARY
Standard C Library (libc.a)
SYNTAX
#include <assert.h>
void assert (expression)
int expression;
DESCRIPTION
The assert macro puts diagnostics into a program. If expression is false
(zero), then assert writes the following message on the standard error output
and aborts the program:
"Assertion failed: "expression", file "filename", line "linenum
In the error message, filename is the name of the source file and linenum is
the source line number of the assert statement.
If you compile a program with the preprocessor option -DNDEBUG, or with the
preprocessor control statement #define NDEBUG ahead of the #include <assert.h>
statement, assertions will not be compiled into the program.
RELATED INFORMATION
In this book: "abort."
The cpp command in AIX Operating System Commands Reference.
Processed November 7, 1990 ASSERT(3,L) 1