You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB
Groff

.TH "<assert.h>: Diagnostics" 3 "24 Jun 2019" "Version 2.0.0" "avr-libc" \" -*- nroff -*-
.ad l
.nh
.SH NAME
<assert.h>: Diagnostics \-
.SS "Defines"
.in +1c
.ti -1c
.RI "#define \fBassert\fP(expression)"
.br
.in -1c
.SH "Detailed Description"
.PP
.PP
.nf
#include <assert.h>
.fi
.PP
.PP
This header file defines a debugging aid.
.PP
As there is no standard error output stream available for many applications using this library, the generation of a printable error message is not enabled by default. These messages will only be generated if the application defines the macro
.PP
.PP
.nf
__ASSERT_USE_STDERR
.fi
.PP
.PP
before including the \fC<\fBassert.h\fP>\fP header file. By default, only \fBabort()\fP will be called to halt the application.
.SH "Define Documentation"
.PP
.SS "#define assert(expression)"\fBParameters:\fP
.RS 4
\fIexpression\fP Expression to test for.
.RE
.PP
The \fBassert()\fP macro tests the given expression and if it is false, the calling process is terminated. A diagnostic message is written to stderr and the function \fBabort()\fP is called, effectively terminating the program.
.PP
If expression is true, the \fBassert()\fP macro does nothing.
.PP
The \fBassert()\fP macro may be removed at compile time by defining NDEBUG as a macro (e.g., by using the compiler option -DNDEBUG).
.SH "Author"
.PP
Generated automatically by Doxygen for avr-libc from the source code.