IUP: Assert Utilities

IUP - Portable User Interface

Assert Utilities
[Utilities]


Detailed Description

All functions of the main API (Iup***) calls iupASSERT to check the parameters.
The IUP main library must be recompiled with the IUP_ASSERT define to enable these checks. iupASSERT is not called inside driver dependent functions nor in each control implementation, it is used only in the functions of the main API and in some utilities.
See iup_assert.h


Defines

#define iupASSERT(_expr)   ((_expr)? (void)0: iupAssert(#_expr, __FILE__, __LINE__, NULL))
#define iupERROR(_msg)   iupError(_msg)

Define Documentation

#define iupASSERT _expr   )     ((_expr)? (void)0: iupAssert(#_expr, __FILE__, __LINE__, NULL))
 

If the expression if false, displays a message with information of the source code where the assert happen.

Parameters:
_expr The evaluated expression.
It is a macro that calls a function only if IUP_ASSERT is defined.

#define iupERROR _msg   )     iupError(_msg)
 

Displays an error message. Also used by the iupASSERT.

It is a macro that calls a function only if IUP_ASSERT is defined.