X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=man3%2Fassert.3;fp=man3%2Fassert.3;h=d2874e384fd345183b6d096afcb284f6f2e34913;hb=c66e7780ad17eb9af82dc61f4e3b44b7f0c890b2;hp=0000000000000000000000000000000000000000;hpb=8ea6754f7b066c496d7c7c68e7695aaec29b253a;p=pdclib.old diff --git a/man3/assert.3 b/man3/assert.3 new file mode 100644 index 0000000..d2874e3 --- /dev/null +++ b/man3/assert.3 @@ -0,0 +1,43 @@ +.\" This file is part of the Public Domain C Library (PDCLib). +.\" Permission is granted to use, modify, and / or redistribute at will. +.\" +.Dd +.Dt assert 3 +.Os + +.Sh NAME +.Nm assert +.Nd validate assertion + +.Sh SYNOPSIS +.In assert.h +.Fn "void assert" "" + +.Sh DESCRIPTION +If +.Dv NDEBUG +was defined when +.In assert.h +was last included, the macro +.Nm +results in no code being generated. Otherwise, if the expression evaluates to +false, an error message is printed to +.Va stderr +and execution is terminated by invoking +.Fn abort . +.Sh IMPLEMENTATION NOTES +The enclosing function of the call to +.Nm +will only be printed in the error message when compiling for C99, or a later +revision of the C standard. + +.Sh SEE ALSO +.Xr _Exit 3 +.Xr quick_exit 3 +.Xr exit 3 +.Xr abort 3 + +.Sh STANDARDS +Conforming to +.St -isoC-90 , +.St -isoC-99 . \ No newline at end of file