assert(3X) assert(3X)
NAME
assert() - verify program assertion
SYNOPSIS
DESCRIPTION
This macro is useful for putting diagnostics into programs. When it is executed, if expression is false (zero), prints:
on the standard error output and aborts. In the error message, xyz is the name of the source file and nnn the source line number of the
statement.
Compiling with the preprocessor option (see cpp(1)), or with the preprocessor control statement ahead of the statement, stops assertions
from being compiled into the program.
WARNINGS
The expression argument used by in compatibility mode cannot contain string literals or double quotes without escapes.
SEE ALSO
cpp(1), abort(3C), thread_safety(5).
STANDARDS CONFORMANCE
assert(3X)