Function: assert

Function: assert

since 0.3.7

Usage

 assert(condition)

Check that the condition is true. Shows a warning message if it is not.

Note: assert is a special built-in keyword, so that the error message can include the condition.

Parameters

Parameter Type Description
input boolean Condition to check.

Examples

 assert(1 + 1 == 2)   # nothing happens
 assert(1 * 1 == 2)   # An error message is shown