Reference » Macros » M_ASSERT

M_ASSERT(Cond) macro

Declared in elBase.h


Ensures that the given condition is satisfied.


In DEBUG mode:

If the logical expression Cond evaluates to false, the macro prints an error message and terminates the program with an exit code 1001 (internal fatal error).

For example: M_ASSERT(x<10) generates an error if x is NOT less than 10 (i.e. the condition is not asserted)

If Cond evaluates to true, nothing happens.

In RELEASE mode the macro is empty. Thus, M_ASSERT allows testing algorithmic correctness without any performance penalty in RELEASE mode.


Let us know

Please Contact us to report any errors on this page, or to suggest any improvements.

Miranor Home | About Miranor | About Elgrint | Create account | Login | Account settings | Contact Us | Privacy Policy | Site map

© Copyright 2014 by Miranor. All rights reserved. By using this site you agree to the Terms of Use.

Page last updated on August 10th, 2014.