參數(shù)資料
型號: NSB8
廠商: Electronic Theatre Controls, Inc.
英文描述: BASIC interpreter for Z80 family
中文描述: Z80的BASIC解釋為家庭
文件頁數(shù): 80/158頁
文件大小: 752K
代理商: NSB8
grifo
ITALIAN TECHNOLOGY
Page 68
NSB8 Rel. 5.10
10 DEF FNQ(X,X$)=ASC(X$)+X
20 X=7 \ X$=”FIRST”
30 PRINT X$,X
40 PRINT FNQ(1,”NEXT”)
50 PRINT X$,X
Note that, although the value of the numeric variable X is saved while the name of X is used for an
argument to FNQ, the same is not true for X$. After the function is evaluated, X$ still retains the value
it was assigned during its use as FNQ argument.
MULTI LINE USER FUNCTIONS
The second type of user function, the multiple line function, permits a value to be computed and
returned by a set of one or more BASIC statements, as opposed to the single expression of the single
line function. The operation and purpose of multi line functions therefore closely parallels that of
subroutines. However, multi line functions permit the easy passing of arguments, and the return of
a single, computed result value.
The definition of a multi line function employs the DEF statement, but without the value equation
necessary to single line function definitions. The DEF statement which begins a multi line function
contains only the keyword DEF, the name of the function, and the list of its parameters:
10 DEF FNM(X,M)
The statements which compute the function value follow this line. When the value has been
computed, a special version of the RETURN statement causes function execution to cease, and
specifies the value to be returned as the function value. Finally, to signal the physical end of the
function definition itself, the FNEND statement is used. As an example, add to the definition of FNM
(started in line 10, above) so that it becomes a function which returns the value of X modulo M, that
is, the remainder generated when X is divided by M:
10 DEF FNM(X,M)
20 IF M<=0 OR M<>INT(M) THEN 40
30 RETURN ABS(X) - (INT(ABS(X) / M)*M)
40 PRINT “ERROR IN MODULO” \ RETURN -1
50 FNEND
In general, multi line functions (as opposed to single line ones) are needed when the algorithm which
computes the function value is too complex to fit on one line as a single expression.
SOME FINAL NOTES
Functions cannot be defined within other functions. One definition must finish before another can
begin. In particular, a FUNCTION DEF ERROR will occur if you forget to include the FNEND
which must conclude every multi line function definition, then, later in the program text, attempt to
define another function.
All user functions must have at least one (1) parameter. It is not necessary to use the parameter in
computation, but it must be a part of the definition, nevertheless.
相關(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