Plan 9 from Bell Labs’s /usr/web/sources/patch/applied/assert-man/assert

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH ASSERT 2
.SH NAME
assert \- check program invariants
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.PP
.B
#define assert(cond) if(cond);else _assert("cond")
.PP
.B
void _assert(int cond)
.SH DESCRIPTION
.I Assert
is a preprocessor macro that
(via
.IR _assert )
prints a message and calls
.I abort
when
.I cond
is false.
.SH SOURCE
.B /sys/src/libc/port/_assert.c

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].