MIAMEX 182: Trigger BASIC Error

Updated ("BASERR") April 2022

xcall MIAMEX, MX_SETERR, errnum {,chan}

MX_SETERR triggers a BASIC error. It may be useful for testing/debugging error handling routines, as well as for using the error trapping mechanism as a way of passing coded signals (i.e. virtual error codes) from within an arbitrarily nested function/procedure up to the main error trap.

Note: MX_BASERR is an alias for MX_SETERR, meaning that calls to MX_BASERR invoke MX_SETERR.

Parameters

errnum  (Num)  [in]

the BASIC error to trigger; sets err(0)

chan  (Num)  [in]

channel number; sets err(2)

History

2012 December, A-Shell 6.1.1329:  Routine added to A-Shell