RAD Studio |  |

assert.h
Collapse All

The following functions, macros, and classes are provided in assert.h:

Topics

Name | Description
NDEBUG #define | Header File assert.h Description NDEBUG means "Use #define to treat assert as a macro or a true function". Can be defined in a user program. If defined, assert is a true function; otherwise assert is a macro.
assert | Header File assert.h Category Diagnostic Routines Prototype void assert(int test); Description Tests a condition and possibly aborts. assert is a macro that expands to an if statement; if test evaluates to zero, the assert macro calls the _assert function void _RTLENTRY _EXPFUNC _assert(char * __cond, char * __file, int __line); and aborts the program. The _assert function calls abort and asserts the following a message on stderr: Assertion failed: test, file filename, line linenum The filename and linenum listed in the message are the source file name and line number where the assert macro appears. If you place the #define... more

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!