.\" Generated by the Allegro makedoc utility .TH ASSERT 3alleg4 "version 4.4.2" "Allegro" "Allegro manual" .SH NAME ASSERT \- Debugging helper macro to assert. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B void ASSERT(condition); .SH DESCRIPTION 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: .nf #define DEBUGMODE #include ... void my_blitter(BITMAP *source, int flags) { int some_variables; ASSERT(source != NULL); ASSERT(flags & GAME_RUNNING); ... } .fi .SH SEE ALSO .BR al_assert (3alleg4), .BR TRACE (3alleg4), .BR register_assert_handler (3alleg4), .BR expackf (3alleg4)