Debugging helper macro to assert.


void ASSERT(condition);
Debugging helper macro. Normally compiles away to nothing, but if you defined the preprocessor symbol DEBUGMODE before including Allegro headers, it will check the supplied condition and call al_assert() if it fails, whose default action is to stop the program and report the assert. You can use this macro even when Allegro has not been initialised. Example:
      #define DEBUGMODE
      #include <allegro.h>
      void my_blitter(BITMAP *source, int flags)
	 int some_variables;
	 ASSERT(source != NULL);
Examples using this:

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: