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