參數(shù)資料
型號(hào): NSB8
廠商: Electronic Theatre Controls, Inc.
英文描述: BASIC interpreter for Z80 family
中文描述: Z80的BASIC解釋為家庭
文件頁數(shù): 118/158頁
文件大?。?/td> 752K
代理商: NSB8
grifo
ITALIAN TECHNOLOGY
Page 106
NSB8 Rel. 5.10
ERROR TRAPPING AND RECOVERY
Normally, when a program error occurs while a BASIC program is running, BASIC automatically
terminates the execution of the program and issues an error message. This is to aid the programmer
in finding and correcting the error. For many possible end user applications, a BASIC program
should operate in the presence of errors rather than terminate execution and print an error
message. The program should detect the error condition, and then take corrective action without
requiring the user to debug and rexecute the program. Certain kinds of errors resulting from incorrect
input, improper diskette handling, or inconsistent data might be too difficult or time consuming to
anticipate and detect using regular BASIC statements.
To make convenient error recovery under program control possible,
NSB8
includes the special
ERRSET statement. With this statement, the programmer specifies a line number which references
the first statement of an error recovery routine, which exists somewhere in the program. Once an
ERRSET has specified the desired error recovery routine, any program error which occurs during
program execution will cause an immediate execution of that routine (this is called trapping the
error). The BASIC statements in the error recovery routine determine the action to take under error
conditions. A good routine will also include statements which attempt to correct the error condition. For
example, if a user was told to insert a diskette into a drive, and then the computer detects a hard disk
error when it attempts to open a file on the diskette, either the diskette has been inserted incorrectly,
or the data on it is invalid. A good error recovery routine might give the user a chance to reinsert the
diskette.
The programmer must also specify two variable names in the ERRSET statement along with the line
number of the start of the error recovery routine, for example:
10 ERRSET 1000,L,E
When an error is trapped, the line number of the statement where the error occurred is assigned as
the value of the first variable, and a numeric code, corresponding to the type of the error, is assigned
to the second variable. By examining the value of these two variables, the program can determine
not only what caused the error condition, but where in the program it occurred, and with this
knowledge, decide what to do about the error.
NSB8
program errors and their codes are listed in
appendix B.
Note that if the error handling routine in a program is written to make any decisions based on the
number of the line in which the error occurs, it may be very unwise to renumber the program.
When an error trap occurs, any subroutines, user functions, and FOR NEXT loops which were active
at the trap time are still active. Thus, it is possible to execute a GOTO statement back to the point
where the error occurred, or to the statement immediately after that point, and continue the execution
of the program after the error condition has been handled.
Error trapping is disabled automatically after each trap. After error recovery is complete, another
ERRSET statement can be executed to resume error trapping mode.
When the program no longer requires the use of BASIC’s error trapping feature, error trapping can
be disabled explicitly by executing the ERRSET statement with no arguments, for example:
100 ERRSET
Unless the <control-C> program interruption feature is disabled (as mentioned in section
CONTROL-C, and section PERSONALIZING BASIC) a trappable program error will occur every
time <control-C> is pressed while the program is running in error trapping mode. If you do not wish
相關(guān)PDF資料
PDF描述
NSB9435T1 High Current Bias Resistor Transistors(高強(qiáng)度電流偏置電阻晶體管)
NSBA114EDXV6T1 Dual Bias Resistor Transistors(雙偏置電阻晶體管)
NSBA114YDXV6T1 Dual Bias Resistor Transistors(雙偏置電阻晶體管)
NSBC143TPDXV6T1 Dual Bias Resistor Transistors(雙偏置電阻晶體管)
NSBC144EPDXV6T1 Dual Bias Resistor Transistors(雙偏置電阻晶體管)
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
NSB8AT 制造商:VISHAY 制造商全稱:Vishay Siliconix 功能描述:Glass Passivated General Purpose Plastic Rectifier
NSB8AT/31 功能描述:整流器 50 Volt 8.0 Amp 125 Amp IFSM RoHS:否 制造商:Vishay Semiconductors 產(chǎn)品:Standard Recovery Rectifiers 配置: 反向電壓:100 V 正向電壓下降: 恢復(fù)時(shí)間:1.2 us 正向連續(xù)電流:2 A 最大浪涌電流:35 A 反向電流 IR:5 uA 安裝風(fēng)格:SMD/SMT 封裝 / 箱體:DO-221AC 封裝:Reel
NSB8AT/45 功能描述:整流器 50 Volt 8.0 Amp 125 Amp IFSM RoHS:否 制造商:Vishay Semiconductors 產(chǎn)品:Standard Recovery Rectifiers 配置: 反向電壓:100 V 正向電壓下降: 恢復(fù)時(shí)間:1.2 us 正向連續(xù)電流:2 A 最大浪涌電流:35 A 反向電流 IR:5 uA 安裝風(fēng)格:SMD/SMT 封裝 / 箱體:DO-221AC 封裝:Reel
NSB8AT/81 功能描述:二極管 - 通用,功率,開關(guān) 50 Volt 8.0 Amp 125 Amp IFSM RoHS:否 制造商:STMicroelectronics 產(chǎn)品:Switching Diodes 峰值反向電壓:600 V 正向連續(xù)電流:200 A 最大浪涌電流:800 A 配置: 恢復(fù)時(shí)間:2000 ns 正向電壓下降:1.25 V 最大反向漏泄電流:300 uA 最大功率耗散: 工作溫度范圍: 安裝風(fēng)格:SMD/SMT 封裝 / 箱體:ISOTOP 封裝:Tube
NSB8AT-E3/31 功能描述:整流器 50 Volt 8.0 Amp 125 Amp IFSM RoHS:否 制造商:Vishay Semiconductors 產(chǎn)品:Standard Recovery Rectifiers 配置: 反向電壓:100 V 正向電壓下降: 恢復(fù)時(shí)間:1.2 us 正向連續(xù)電流:2 A 最大浪涌電流:35 A 反向電流 IR:5 uA 安裝風(fēng)格:SMD/SMT 封裝 / 箱體:DO-221AC 封裝:Reel