up previous next
error

throw an error message

Syntax
error(S: STRING): ERROR

Description
This function throws an error containing the given message. For backward compatibility the function may also be called using the name Error

Example
/**/ Define T(N)
/**/   If type(N) <> INT Then error("Argument must be an integer."); EndIf;
/**/   Return mod(N,5);
/**/ EndDefine;

-- /**/ T(1/3); --> !!! ERROR !!!
ERROR: Argument must be an integer.
    If type(N) <> INT Then error("Argument must be an integer."); EndIf;
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CONTEXT: function T (previously defined at the prompt)
 called at top-level

/**/  T(7);
2

See Also