Sfairadora

  • Reference Guide

is_error

is_error(value)
If the parameter value is a value of the type Error, the function returns TRUE, otherwise FALSE. Note: The function stops the error propagation from the expression of value. Using the function is equivalent to the expression type(value)==Error.
Example 1:
is_error(x/0)
this expression returns TRUE (the error division by zero), it stops the propagation of the error.
Example 2:
var Real ?q = x/y;
if(is_error(q))
...
The question mark makes the variable non-strict, that is such a variable that can contain an error value. In the subsequent condition within the example, the occurrence of an error is tested.