06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

assert pREPC+ <strong>System</strong> <strong>Calls</strong><br />

assert Verifies that a program is operating correctly.<br />

#include <br />

void assert (<br />

int expression /* test expression */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

Error Codes<br />

Notes<br />

The assert() macro, defined in the header file assert.h, writes error information<br />

to stderr if the expression expression evaluates to zero. The error information<br />

includes the text of the argument, the name of the source file, and the source line<br />

number. The last two of these are respectively the values of the preprocessing<br />

macros __FILE__ and __LINE__.<br />

If expression does not evaluate to zero, assert() does nothing.<br />

expression Specifies the expression to be evaluated.<br />

The assert() macro returns no value.<br />

None.<br />

Callable From<br />

■ Task<br />

3-8 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!