*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> assert (3)              
Title
Content
Arch
Section
 

assert(3)

Contents


NAME    [Toc]    [Back]

       assert - Inserts program diagnostics

SYNOPSIS    [Toc]    [Back]

       #include <assert.h>

       void assert(
               int expression );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       assert():  XPG4, XPG4-UNIX

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies  an  expression  that  is  evaluated  as TRUE or
       FALSE. This expression is evaluated in the same manner  as
       a C language if control statement.

DESCRIPTION    [Toc]    [Back]

       The  assert()  macro inserts diagnostics into programs. On
       execution, when the expression parameter is false (returns
       FALSE), this macro writes information about the particular
       call that failed, including the text of the argument,  the
       name  of  the source file, and the source-file line number
       (the latter two are respectively the values of preprocessing
  macros  __FILE__  and  __LINE__) on stderr. The error
       message is taken from the standard C library message catalog.
 The assert() macro then calls the abort() function to
       (normally) terminate the process.

       When you compile a program with the -DNDEBUG  preprocessor
       option,  or  with  the #define NDEBUG preprocessor control
       statement before the #include <assert.h> statement,  calls
       to the assert() macro have no effect.

RETURN VALUES    [Toc]    [Back]

       The assert() function returns no value.

SEE ALSO    [Toc]    [Back]

      
      
       Routines: abort(3)

       Standards: standards(5)



                                                        assert(3)
[ Back ]
 Similar pages
Name OS Title
diagnostics IRIX Perl compiler pragma to force verbose warning diagnostics splain - standalone program to do the same thing
perldiag OpenBSD various Perl diagnostics
perldiag IRIX various Perl diagnostics
autoconf OpenBSD diagnostics from the autoconfiguration code
autoconf OpenBSD diagnostics from the autoconfiguration code
autoconf OpenBSD diagnostics from the autoconfiguration code
autoconf OpenBSD diagnostics from the autoconfiguration code
autoconf OpenBSD diagnostics from the autoconfiguration code
autoconf OpenBSD diagnostics from the autoconfiguration code
autoconf OpenBSD diagnostics from the autoconfiguration code
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service