Index of Section 3 Manual Pages

Interix / SUAassert.3Interix / SUA

assert(3)                                                     assert(3)

  assert()

  NAME

    assert() - expression verification macro

  SYNOPSIS

    #include 

    assert (expression)

  DESCRIPTION

    The assert(3) macro tests the given expression. If it is true, assert(3)
    does nothing. If it is false, the calling process is terminated, a
    diagnostic message is written to the stderr and the function _exit(2) is
    called, effectively terminating the program.

    At compile time, you may remove the assert(3) macro by #defining the
    NDEBUG macro before the inclusion of , usually by giving the
    compiler the -DNDEBUG option (see your compiler documentation).

  DIAGNOSTICS

    The following diagnostic message is written to stderr if expression is
    false:

    "assertion \"%s\" failed: file \"%s\", line %d0, \
                  "expression", __FILE__, __LINE__);

  USAGE NOTES

    The assert function is thread safe.

    The assert function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA