Bell 32V release
[unix-history] / usr / man / man3 / assert.3x
CommitLineData
6022f826
TL
1.TH ASSERT 3X
2.SH NAME
3assert \- program verification
4.SH SYNOPSIS
5.B #include <assert.h>
6.PP
7.B assert (expression)
8.SH DESCRIPTION
9.PP
10.I Assert
11is a macro that indicates
12.I expression
13is expected to be true at this point in the program.
14It causes an
15.IR exit (2)
16with a diagnostic comment on the standard output
17when
18.I expression
19is false (0).
20Compiling with the
21.IR cc (1)
22option
23.SM
24.B \-DNDEBUG
25effectively deletes
26.I assert
27from the program.
28.SH DIAGNOSTICS
29`Assertion failed: file
30.I f
31line
32.I n.'
33.I F
34is the source file and
35.I n
36the source line number
37of the
38.I assert
39statement.