![Texas Instruments PHP1240 Скачать руководство пользователя страница 36](http://html.mh-extra.com/html/texas-instruments/php1240/php1240_manual_1097136036.webp)
Disk Memory System
INPUT - The INPUT statement allows you to read data from diskette files. It only can
be used with files opened in INPUT or UPDATE mode.
The INPUT statement has the following general form:
INPUT #fillHlumber [,REC record-number]:variable-list
Thejlle-number
and a
variable-list
must be included in the INPUT statement. The
record-number
may optionally be included when reading random-access files .
•
jlle-number - Thejlle-number
is the number assigned to a particular
file by the OPEN statement. Thejl
le-number
is.entered as a number
sign
(#)
followed by a number or a numeric expression that. when
rounded to the nearest Integer. is a number from 1 to
255
and is the
number of a file that is open .
•
record-number
- A
record-number
refers to the record on the file which
you want to read. The
record-number
can only be specified for
RELATIVE files. (SEQUENTIAL files are read in sequential order.)
•
variable-list -
The
variable-list
is the list of variables into which you
want the data from the file to be read. It consists of string or numeric
variables separated by commas.
The following are examples of INPUT statements.
INPUT #1 :X$
INPUT #23:X.A.LL$
INPUT #1 1 . REC 44:TAX
INPUT #3:A.B.C.
Puts into X$ the next value available in the file
that was opened as
#1 .
Puts into X. A. and LL$ the next three values
from the file that was opened as
#23.
Puts into TAX the first value of record number
44 of the file that was opened as
#1 1 .
Puts into A. B. and C the next three values from
the file that was opened as
#3.
The comma after
C creates a pending input condition. When the
next INPUT statement using this file is
performed. one of the following actions occurs.
If the next INPUT statement has no REC clause.
the computer uses the data beginning where the
previous INPUT statement stopped.
If the next INPUT statement includes a REC
clause. the computer terminates the pending
input condition and reads the specified record.
33
Содержание PHP1240
Страница 1: ......