qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ERROR Statement Details
  QuickSCREEN      Details      Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
ERROR Statement Details
 
Syntax
  ERROR integerexpression
 
The integerexpression represents the error code. It must be greater
than 0 and less than or equal to 255. If the integerexpression is an
error code already used by BASIC, then the ERROR statement simulates
the occurrence of that error and prints the corresponding error
message.
 
To define your own error code, use a value that is greater than any
used by the standard BASIC error codes. (Start at 255 and work down
to maintain compatibility with future Microsoft BASIC error codes.)
 
If an ERROR statement specifies a code for which no error message
has been defined, the message "Unprintable error" is printed.
Executing an ERROR statement for which there is no error-handling
routine causes an error message to be printed and execution to halt.