MicrOS
assert.h File Reference
#include "stdio.h"

Go to the source code of this file.

Macros

#define assert(expression)
 Check if value is upper alphanumeric. More...
 

Macro Definition Documentation

◆ assert

#define assert (   expression)
Value:
if (!(expression)) \
{ \
fprintf(stderr, "Assertion failed (%s): %s at line %d", #expression, __FILE__, __LINE__); \
abort(); \
}
FILE * stderr
Standard error output (default is console).
Definition: stdio.c:5

Check if value is upper alphanumeric.

If the argument expression of this macro with functional form compares equal to zero (i.e., the expression is false), a message is written to the standard error device and abort is called, terminating the program execution.

Parameters
expressionExpression to be evaluated. If this expression evaluates to 0, this causes an assertion failure that terminates the program..