stddbc - anssihalmeaho/funl GitHub Wiki
stddbc
Support for Design By Contract type of programming.
assert
Checks assertion. if condition evaluates to true return value is true. If condition evalautes to false Runtime Error is generated with error text given as 2nd argument (string).
type: function
Arguments:
- condition (bool expression or function)
- error text (string), used in case assertion fails
If 1st argument is function then function is called and result (bool) is treated as condition value.
Format:
call(stddbc.assert <condition/function> <error-string>) -> true / Runtime Error