IUP: Assert Utilities

IUP - Portable User Interface

Assert Utilities
[Utilities]


Detailed Description

All functions of the main API (Iup***) calls iup_assert to check the parameters.
The IUP main library must be recompiled with the IUP_ASSERT define to enable these checks. iup_assert 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 iup_assert(_expr)   ((_expr)? (void)0: iupAssert(#_expr, __FILE__, __LINE__, NULL))
#define iup_error(_msg)   iupError(_msg)

Define Documentation

#define iup_assert _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 iup_error _msg   )     iupError(_msg)
 

Displays an error message. Also used by the iup_assert.

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