Specifications
Chapter 8. Files
129
8.2.4 Data File Management by Directory Informa-
tion
The Interpreter manages data files using the directory information stored in the system area of
the memory.
The directory information, for example, contains the following:
filename.extension
Information of Each Field (Field length)
Number of Written Records
Maximum Number of Registrable Records
• Number of Written Records
Means the number of records already written in a data file, which the LOF function can
return.
If no record number is specified in the
PUT statement, the Interpreter automatically assigns a
number of (the current written record number + 1) to the record.
PUT #1
• Maximum Number of Registrable Records
You may declare the maximum number of records registrable in a data file by using the
RECORD option in the OPEN statement, as shown below.
OPEN "work.DAT" AS #10 RECORD 50
FIELD #10,13 AS code$,5 AS price$
The above program allows you to write up to 50 records in the data file named work.DAT.
If the statement below is executed following the above program, a run-time error will occur.
PUT #10,51
The maximum number of registrable records can be optionally specified only when you
make a new data file. If designated to the already existing data file, the specification will be
ignored without occurrence of a run-time error.
If the BHT-100 receives a file with the
XFILE statement, it will automatically set the maxi-
mum number of registrable records to 32,767 for that file.
Specifying the maximum number of registrable records will not cause the Interpreter to
reserve the memory area.