assert man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

ASSERT(3)		 BSD Library Functions Manual		     ASSERT(3)

NAME
     assert — expression verification macro

SYNOPSIS
     #include <assert.h>

     assert(expression);

DESCRIPTION
     The assert() 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 abort(3) is called, effectively terminating the program.

     If expression is true, the assert() macro does nothing.

     The assert() macro may be removed at compile time by defining NDEBUG as a
     macro (e.g., by using the cc(1) option -DNDEBUG).

EXAMPLES
     The assertion:

	   assert(1 == 0);

     generates a diagnostic message similar to the following:

	   Assertion failed: (1 == 0), function main, file assertion.c, line
	   100.

SEE ALSO
     abort(3)

STANDARDS
     The assert() macro conforms to ISO/IEC 9899:1999 (“ISO C99”).

HISTORY
     An assert macro appeared in Version 6 AT&T UNIX.

BSD			       January 26, 1999				   BSD
[top]

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
...................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net