previous | start | next

Preconditions (Syntax 5.6 : Assertions)

Syntax 5.6 : Assertions

assert(expression);
Example:
assert(x >= 0);
Purpose: If the expression is true, do nothing. If the expression is false, terminate the program, displaying the file name, line number, and expression.


previous | start | next