BSD 4_2 development
[unix-history] / usr / man / man3 / assert.3x
CommitLineData
05dda90f
C
1.TH ASSERT 3X "19 January 1983"
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 when
17.I expression
18is false (0).
19Compiling with the
20.IR cc (1)
21option
22.SM
23.B \-DNDEBUG
24effectively deletes
25.I assert
26from the program.
27.SH DIAGNOSTICS
28`Assertion failed: file
29.I f
30line
31.I n.'
32.I F
33is the source file and
34.I n
35the source line number of the
36.I assert
37statement.