[next] [previous] [contents]

  16.2.8 Forcing Errors
  The CAUSE ERROR statement allows a program to ar-
  tificially generate an error when the program would not
  otherwise do so. You can force any BASIC run-time er-
  ror. You must specify the number of the error the compiler
  should force; the error numbers are listed in Appendix B. The
  following statement forces an end-of-file error (ERR=11) to
  occur:
  CAUSE ERROR 11%

  You can use this feature to debug an error handler during
  program development, as shown in the following example:
  
EXAMPLE: Click to display example.