EXIT statement

The EXIT statement is different from the RETURN statement in that it stops all processing of the XJEase files and stops execution. This is useful for when an irretrievable error is hit and the user would like to stop processing immediately.

When running tests in XJRunner, EXIT terminates the current test and prevents any other the tests for the current board being run, even if Continue on Test Failure is set. Any post-function will be run, however.

EXIT takes an optional argument, which will be the exit code when running from the command-line with XJRun. If the argument is omitted, a default return code of 1 will be used.

Example

INTERNAL CheckIdcode(INT idCode)()
  IF idCode != 0x12341234 THEN
    PRINT("ERROR: idCode read as ", HEX(idCode), "\n");
    EXIT();
  END;
END;

See Also