Profile

ASSERT

ASSERT

NAME

ASSERT - Debugging helper macro to assert. Allegro game programming library.

SYNOPSIS

#include <allegro.h>

void ASSERT(condition);

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:

   #define DEBUGMODE
   #include 
   ...
   void my_blitter(BITMAP *source, int flags)
   {
      int some_variables;
      ASSERT(source != NULL);
      ASSERT(flags & GAME_RUNNING);
      ...
   }

SEE ALSO

al_assert(3alleg4), TRACE(3alleg4), register_assert_handler(3alleg4), expackf(3alleg4)

TRACE.3alleg4,al_assert.3alleg4,expackf.3alleg4,register_assert_handler.3alleg4
Latest Tech News
Your Notes

Sign in/Sign up

Signing in to our system allows you to post your contributions and vote on the contributions of others. It will also allow you to get extra perts like having your favorites in the cloud and having your persistent personal notes wherever you go. More will be added as we scale up our services.

By signing in to our system, you agree our Member Terms and Conditions


Sign-in with one of the following services

Almost finished!

Please select a screen name for NET SOUP.



 Please send me news and special offers from NET SOUP.

 I have read and accept the Terms of Use.

COMPLIMENTARY EXAMPLES

We have no example yet for this entry


Your Name
Now

Community Contributions and Discussions

Modify your search

View Documentation

Jobs from Indeed