up | Inhaltsverzeichniss | Kommentar

Manual page for ASSERT(3V)

assert - program verification

SYNOPSIS

#include <assert.h>

assert(expression)

DESCRIPTION

assert() is a macro that indicates expression is expected to be true at this point in the program. If expression is false (0), it displays a diagnostic message on the standard output and exits (see exit.2v Compiling with the cc.1v option -DNDEBUG, or placing the preprocessor control statement

#define NDEBUG

before the ``#include <assert.h>'' statement effectively deletes assert() from the program.

SYSTEM V DESCRIPTION

The System V version of assert() calls abort.3 rather than exit().

SEE ALSO

cc.1v exit.2v abort.3

DIAGNOSTICS

Assertion failed: file f line n
The expression passed to the assert() statement at line n of source file f was false.

SYSTEM V DIAGNOSTICS

Assertion failed: expression, file f, line n
The expression passed to the assert() statement at line n of source file f was false.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97