SYNOPSIS
#include <assert.h>
void assert(int expression);
DESCRIPTION
The
Forcing a definition of the name NDEBUG, either from the compiler command line or with the preprocessor control statement #define NDEBUG prior to including <assert.h>, stops assertions from being compiled into the program.
PARAMETERS
- expression
-
Is an integer expression expected to be true at this point in the program. expression may not contain any string literals.
RETURN VALUES
None.
CONFORMANCE
ANSI/ISO 9899-1990.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
Windows-subsystem applications (that is, pure GUI) do not have their stdio streams attached to a text-mode console by default. You need to either explicitly attach a console (see /dev/console), or us an alternate mechanism to display assertion failures.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Commands:
- cc
- Functions:
abort()
PTC MKS Toolkit 10.5 Documentation Build 40.