-

Changes

Jump to: navigation, search

Functions HI-TECH C ASSERT

886 bytes added, 18:13, 31 July 2017
Created page with "<strong>ASSERT</strong> ==SYNOPSIS== #include <assert.h> void assert(int e) ==DESCRIPTION== This macro is used for debugging purposes; the basic method of us..."
<strong>ASSERT</strong>
==SYNOPSIS==

#include <assert.h>

void assert(int e)


==DESCRIPTION==
This macro is used for debugging purposes; the basic
method of usage is to place assertions liberally
throughout your code at points where correct operation
of the code depends upon certain conditions being true
initially. An <strong>assert</strong>() may be used to ensure at run
time that that assumption holds. For example, the following statement asserts that the pointer tp is non-null:

assert(tp);

If at run time the expression evaluates to false, the
program will abort with a message identifying the
source file and line number of the assertion, and the
expression used as an argument to it. A fuller discussion of the uses of assert is impossible in limited
space, but it is closely linked to methods of proving
program correctness.

Navigation menu