參數(shù)資料
型號: NSB8
廠商: Electronic Theatre Controls, Inc.
英文描述: BASIC interpreter for Z80 family
中文描述: Z80的BASIC解釋為家庭
文件頁數(shù): 110/158頁
文件大小: 752K
代理商: NSB8
grifo
ITALIAN TECHNOLOGY
Page 98
NSB8 Rel. 5.10
TYPES OF DATA ELEMENTS IN FILES
Three types of data may be stored in BASIC data files: numbers, strings, and separate bytes. Each
type of item takes up a certain amount of space on the file when it is stored. Numbers always take
up a fixed amount of space. This space is sufficient to hold any numeric value. Strings can take up
variable amounts of space, depending upon the current length of the string when it is written to a
file. Separate byte values require only one byte of disk storage space to store. Each element of byte
information contains a binary integer value from 0 to 255.
BASIC writes strings and numbers to data files using a certain well defined formats. Consequently,
it is easy for BASIC to recognize string and numeric data when a file is READ. Bytes, however,
cannot be so identified. The programmer must always know when byte data will be encountered
during file reading and writing. If such knowledge is not available to a file reading program, it may
be impossible for that program to make sense of a file’s contents.
DATA ACCESS
The two statements which permit input from a file and output to a file are READ# and WRITE#. READ#
inputs data from a file and assigns it to variables as specified by the programmer. WRITE# overwrites
any previously existing information at a given point in the file with new information, also as specified
by the programmer (see statements READ# and WRITE# for specific details). READ# and WRITE#
may be used to access string, numeric, or byte valued information in sequential or random
fashion. The rest of this chapter examines these data access methods.
SEQUENTIAL ACCESS
The simplest files consist of sequences of data values (all string, all numeric, all byte, or combinations
of these). This means that the first data value is located at the start of the file, and succeeding values
follow immediately afterward, one after another. BASIC automatically places a special end of file
mark (called an endmark) after the last value in a sequential file. This facilitates later reading of the
file, because the endmark may act as a signal to the program to quit reading, lest a program error occur
when an attempt is made to READ (or READ past) the endmark.
A check for the endmark can be made with the built in TYP function. TYP, when supplied with the
number of an open file as argument, returns the numeric code for the type of the next element to be
READ from that file:
TYPE
NEXT VALUE
endmark
string
number
0
1
2
Therefore, if the value of TYP(1) is 0, then the end of file #1 has been reached, and no more reading
from that file should be attempted. The TYP function also permits a program to know whether to
READ a string or numeric value next, since the types for those data elements are also returned. This
is important, because a program which tries to READ a numeric value into a string variable, or a string
value into a numeric variable will generate a TYPE ERROR. With this in mind, here is a program
which reads an existing sequential data file whose contents include an unknown sequence of
intermixed string and numeric values, then prints the contents to the console terminal:
相關(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ù)時間: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ù)時間: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ù)時間: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ù)時間:1.2 us 正向連續(xù)電流:2 A 最大浪涌電流:35 A 反向電流 IR:5 uA 安裝風(fēng)格:SMD/SMT 封裝 / 箱體:DO-221AC 封裝:Reel