home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pg100 / error.tip < prev    next >
Text File  |  2006-10-19  |  894b  |  26 lines

  1. ERROR.TIP  by Paul Globman [72227,1661]
  2.            Copyright (c) 1990
  3.  
  4. Some BASIC interpreters will not only inform you of a syntax error in the
  5. program, but will automatically go into the EDIT mode for the offending line.
  6.  
  7. You can make the M100 do the same thing By putting the following code into 
  8. your program...
  9.  
  10.  10 ON ERROR GOTO 1000
  11.  .
  12.  .
  13.  .
  14.  1000 BEEP:PRINT"Error"ERR"in line"ERL
  15.  1001 IFERR=2THEN EDIT. ELSE LIST.
  16.  
  17.  
  18. The dot (.) after EDIT or LIST means "current line" and this is not altered
  19. by the ON ERROR statement, so it can be used as a BASIC debugging tool.
  20.  
  21. Be sure the ON ERROR statement is not followed by a CLEAR statement.  Use
  22. this code for debugging and remove when program is debugged.  Syntax errors
  23. will invoke the editor for the offending line, and all other errors will
  24. simply cause the program to list the offending line for you to review.
  25.  
  26.