projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
date and time created 87/12/12 18:18:20 by bostic
[unix-history]
/
usr
/
src
/
share
/
man
/
man3
/
assert.3
.\" @(#)assert.3 6.2 (Berkeley) %G%
.\"
.TH ASSERT 3 ""
.AT 3
.SH NAME
assert \- program verification
.SH SYNOPSIS
.B #include <assert.h>
.PP
.B assert(expression)
.SH DESCRIPTION
.PP
.I Assert
is a macro that indicates
.I expression
is expected to be true at this point in the program.
It causes an
.IR exit (2)
with a diagnostic comment on the standard output when
.I expression
is false (0).
Compiling with the
.IR cc (1)
option
.SM
.B \-DNDEBUG
effectively deletes
.I assert
from the program.
.SH DIAGNOSTICS
`Assertion failed: file
.I f
line
.I n.'
.I F
is the source file and
.I n
the source line number of the
.I assert
statement.