Programming instructions

68
Intermec Fingerprint 6.13 – Programmer's Guide
7. INPUT TO FINGERPRINT, cont'd.
5. Input from a Random
File, cont'd.
Now you can use the variables assigned to the fields in the record
by means of the FIELD statement to handle the data. Possible
numeric expressions converted to string format before being put
into the record can now be converted back to numeric format using
VAL functions. In our example, we will simply print the data on the
screen:
40 PRINT F1$,F2$,F3$
CLOSE
Finally, close the file and execute:
50 CLOSE #1
RUN
Yields:
ABC DEF 123456
Two instructions facilitate the use of random files:
LOC (Location)
The LOC function returns the number of the last record read by the
use of GET statement.
This example closes the file "ADDRESSES" when record No. 100
has been read from the file:
10 OPEN "ADDRESSES" AS #1
.....
.....
.....
200 IF LOC(1)=100 THEN CLOSE #1
.....
.....
LOF (Length-of-File)
The LOF function returns the length in bytes of an OPENed file.
The example illustrates how the length of the file "Pricelist" is
returned:
10 OPEN "PRICELIST" AS #5
20 PRINT LOF(5)
. . . .
. . . .
VAL function
Also see:
Chapter 9.2