參數(shù)資料
型號: NSB8
廠商: Electronic Theatre Controls, Inc.
英文描述: BASIC interpreter for Z80 family
中文描述: Z80的BASIC解釋為家庭
文件頁數(shù): 87/158頁
文件大?。?/td> 752K
代理商: NSB8
ITALIAN TECHNOLOGY
grifo
Page 75
NSB8 Rel. 5.10
USING ARRAYS
INDEXING AND SUBSCRIPTING
An array is an ordered collection of numeric variables. The entire array, as a whole, has a single
variable name, and all the variables (called elements) in the array share that name, much as the
members of a typical family share the same surname. An individual element in an array is identified
by its unique index number, which denotes its position in the ordering of the array elements. For the
convenience of both those who prefer counting from zero and those who prefer counting from one,
an extra element, the zero element, is included in each array. For example, a 50 element array, having
a maximum index number of 50, actually has 51 elements, indexed 0, 1, 2, …, 49, 50.
To represent a given array element in a numeric expression, you must follow the name of the array
with a subscript, the index number of the desired element enclosed in parentheses. For example, the
zero element of array A would be written as A(0), the eighth element as A(8), etc.
The index in a subscript may take the form of any numeric expression, it need not merely be a
constant. Therefore, if the simple variable I contains the value of 4, then A(I) will represent the same
element as A(4). Care should be taken, however, to make sure that any expression used as an array
index will not evaluate to a negative number or a number greater than the maximum index of the given
array. If either of these things happens, an OUT OF BOUNDS ERROR will occur. If the index
evaluates to a non integer, BASIC will truncate the value to an integer (truncation involves throwing
away the fractional part of a number and keeping only the whole part. The number 3.6 would be
truncated to the whole number 3. Note that this is not the same as rounding).
Note that the simple variable A and an array A may coexist in the same program without in any way
affecting each other. Arrays and simple variables with the same names are separate, distinct
entities. BASIC does not confuse the two, since a simple variable name will never be followed by
a subscript, while the name of an array must always be followed by one.
MULTIPLE DIMENSION ARRAYS
Arrays which require only one index may be thought of as single rows of variables. BASIC also
permits the definition of arrays which use more than one index in their subscripts. The addition of
each new index to an array is said to add another dimension to the array, and an array with n indices
is called an n dimensional array. When using more than one index to reference a single element, the
indices must be separated by commas. Remember that each index is allowed to be a numeric
expression.
To access the third element in the fifth row of a two dimensional array M, for example, you write
M(5,3). Assuming M has a maximum row number of X and a greatest column index of Y, the
following statements will list the contents of each element in the array in an appropriate tabular
format:
10 FOR I=0 TO X
20
FOR J=0 TO Y
25
REM Print next element w/no <CR>
30
PRINT TAB (I*15) , M (I,J),
35
REM Each column of numbers
36
REM is 15 spaces wide.
40
NEXT
相關(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