SilverScreen Solid Modeler

assert

assert

Previous topic Next topic  

assert

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

void assert( int expression )

 

int expression;      /* the assertion */

 

 

 




Synopsis

#include "assert.h"

 

The assert macro evaluates the assertion denoted by expression and if it is zero (or false), and the special "no debug" identifier NDEBUG is not defined, causes an error message (which includes the name of the file, source line number, and text of the assertion) to be displayed on the screen, and then calls the abort function. Otherwise, no action is taken.

 

 

Parameters

expression is an integral expression, that should normally be non-zero; that is, in the normal course of program execution, the programmer would expect that the value of the expression is non-zero, and if it is zero, then this is a program logic error.

 

 

Return Value

none

 

 

Comments

assert is implemented as a macro.

 

 

See Also

abort