ERRM$ returns the line number (ERRLN), error number (ERRN) and associated error message text. The null string is returned if no error has been generated since start-up, LOAD, GET, SCRATCH or CLEAR ERROR.
Porting Issues
HTBasic error messages are usually similar to those in HP BASIC. Programs that depend on ERRM$ returning the exact same message as HP BASIC should be modified accordingly. In particular, where an HP BASIC error message has seemed less descriptive than it should be, HTBasic returns a more descriptive message.