If you don't tell us which asserttion axactly fails, we'll have a hard time helping you.
An assert is a simple statement that checks if an expression is true, and throws an exception otherwise. It helps finding bugs, when you have a condition that *MUST* and is supposed to be true.
Here's an example:
A last note: such checks are used for debugging purpose, and thus are done only in a debug build.
An assert is a simple statement that checks if an expression is true, and throws an exception otherwise. It helps finding bugs, when you have a condition that *MUST* and is supposed to be true.
Here's an example:
Framework brl.basic Import brl.standardio Function PrintSqr(a) Assert (a > 0) Else "Can't compute square root of negative integer" Print Sqr(a) End Function PrintSqr(-10)Because PrintSqr is called with a < 0, an exception is raised, and here the program stops. There could be no error message with the assert (just "Assert (a >= 0)"), but even then it's not that hard figuring what's wrong: the offending line should be highlighted in the editor.
A last note: such checks are used for debugging purpose, and thus are done only in a debug build.