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