ASSERT and ASSERTWARN fix

Post your FreeBASIC tips and tricks here. Please don’t post your code without including an explanation.
stylin
Posts: 1253
Joined: Nov 06, 2005 5:19

ASSERT and ASSERTWARN fix

Postby stylin » Mar 31, 2006 18:40

Workaround to allow these macros within statement seperators, particularly other control statements in macros (surrounding control is no longer caught in the inner nest):

Code: Select all

#ifdef ASSERT
# undef ASSERT
# define ASSERT(e) if (e) = FALSE then fb_Assert(__FILE__, __LINE__, __FUNCTION__, #e) end if
#endif
#ifdef ASSERTWARN
# undef ASSERTWARN
# define ASSERTWARN(e) if (e) = FALSE then fb_AssertWarn(__FILE__, __LINE__, __FUNCTION__, #e) end if
#endif
v1ctor
Site Admin
Posts: 3799
Joined: May 27, 2005 8:08
Location: SP / Bra[s]il
Contact:

Postby v1ctor » Apr 15, 2006 4:52

I missed this one, fixed, thanks.

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests