ERRM$
                                 =====

        Function to return a standard error message as a string

Usage

        string$ = ERRM$(<error code>)


Accesses the Qdos/SMSQ message table to return the message string
associated with the given error code, in the current language.

However, not all messages in the table are error messages, so other
messages (ie those without a termnating LF) will appear truncated. If a
suitable message for a given code cant be found, ie codes > 27 in Qdos,
"unknown message" is returned (in English!)

ERRM$ also supports the "special" error message convention:

Given a standard Qdos string in memory, its address, with the top bit set,
may be used as an error code. For example:

10 adr = ALCHP(50)
20 POKESTR$ adr, 'Serious error here!' & CHR$(10)
25 er = adr + $80000000
40 PRINT ERRM$(er)
50 RECHP adr

REPORT er and ERT er will all return the same error message.

(QUIT er is not a good idea here, unless the memory where the error is
stored is outside the job!)


Two versions are provided: One for all systems, and one for SMSQ/E only.
The files relevant to the SMSQ/E-only version are tagged with a trailing S.


Software status
---------------

V0.01, pjw, 2003 Apr 03++, Qdos versions V0.01 to 0.03
V0.02, pjw, 2018 Dec 30, new SMSQ/E-only version
V0.03, pjw, 2019 Apr 29, fixed stack errors (both versions)
V0.04, pjw, 2020 Jan 27, reorganised. No functional change


Conditions of use and disclaimer as per Knoware.no