Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 1 minute(s)
Tags: printing output
This function is used to print standard jBASE error messages. It takes the general form:
Where expression should evaluate to the numeric or string name of a valid error message in the jBASE error message file. If the error message requires parameters then these can be passed to the message as subsequent fields of expression.
# International Mode
When the PRINTERR statement is used in International Mode, the error message file to be used, i.e. the default “jBASICmessages” or other as configured via the error message environment variable, will be suffixed with the current locale. For example, if the currently configured locale is “fr_FR” then the statement will attempt to find the specified error message record id in the “jBASICmessages_fr_FR” error message file. If the file cannot be found then the country code will be discarded and just the language code used. i.e. the file jBASICmessages_fr” will be used. If this file is also not found then the error message file “jBASICmessages” will be used.
- The PRINTERR statement is most useful for user-defined messages that have been added to the standard set, with care being taken to not type the PRINTER statement instead.
- Although this is not ideal, the PRINTERR statement must be supported for compatibility with older systems.
An example of use is as:
Go back to jBASE BASIC
Go back to Programmers' Reference Guide