Programming instructions

Intermec Fingerprint v7.61 Programmers Reference Manual Ed. 7 157
Chapter 2 Program Instructions
LOC
Field of Application
Function returning the current position in an OPEN le or the status of
the buffers in an OPEN communication channel.
Syntax LOC(<nexp>)
<nexp> is the number assigned to the le or communication channel
when it was OPENed.
Remarks
In a random le, LOC will return the number of the last record read or written
by the use of GET or PUT statements respectively.
In a sequential le, the number of 128-byte blocks, that have been read or
written since the le was OPENed, will be returned.
LOC can also be used to check the receive or transmit buffer of the speci ed
communication channel:
If the channel is OPENed for INPUT, the remaining number of characters
(bytes) to be read from the receive buffer is returned.
If the channel is OPENed for OUTPUT, the remaining free space (bytes)
in the transmit buffer is returned.
The number of bytes includes characters that will be MAPped as NUL.
Examples
This example closes the le "addresses" when record No. 100 has been
read from the le:
10 OPEN "ADDRESSES" FOR INPUT AS #1
.....
.....
.....
200 IF LOC(1)=100 THEN CLOSE #1
.....
.....
This example reads the number of bytes which remains to be received from
the receive buffer of "uart2:":
100 OPEN "uart2:" FOR INPUT AS #2
110 A%=LOC(2)
120 PRINT A%