![]() |
![]() |
5 |
![]() |
Chapter 1: BASIC’s Basics
|
errors such as division by zero, or references to a non-existent file, forenample. When a mn- time error is discovered, the program
halts
andax Alertis displayed with a brief indication of
what theproblem is. As with syntax errors, the cursor will position
itself
near the offending statemenlin theEdit window. Forexample, seethe picture on the following page.
Whenaprogram stops because of a run-time error, you can
besure thatexecution has
atleast started, and so in tracking down she bug it may be helpful
if to inspect
the program’s
variables. (You can do this by entering PRINT
variable-name
into the Dialogue window.) Changing theprogram willmean losingthecontentsoflhesevariables,and youmay notwish to do this; so before you can edit your program after a mo-time bug, a dialogue appears warning you that you
are
abeulto destroy the value held in your pmgram’s variables.
If you need to pre-ocan a program without mnning it, select the option Check out on the Program menu.
If the program runs succesufully, it will finiub by displaying an Alert with the words Program END. Clearthe dialogue by clicking on OK.
|
BASIC 2 PIus: User Guide & Quick Reference
5
|
![]() |
![]() |
5 |
![]() |