02.10.2012 Views

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

Programmer's Reference Manual Intermec Fingerprint® v8.70.0 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter —Program Instructions<br />

LOF<br />

Purpose Function returning the length in bytes of an OPEN sequential or random<br />

file, or returning the status of the buffers in an OPEN communication<br />

channel.<br />

Syntax LOF()<br />

() is the number assigned to the file or communication channel<br />

when it was OPENed.<br />

Remarks LOF can also be used to check the receive or transmit buffer of the specified<br />

communication channel:<br />

• If a channel is OPENed for INPUT, the remaining free space (bytes) in<br />

the receive buffer is returned.<br />

• If a channel is OPENed for OUTPUT, the remaining number of characters<br />

to be transmitted from the transmit buffer is returned.<br />

Examples The first example illustrates how the length of the file "Pricelist" is<br />

returned:<br />

10 OPEN "PRICELIST" AS #5<br />

20 A%=LOF(5)<br />

30 PRINT A%<br />

. . . .<br />

. . . .<br />

The second example shows how the number of free bytes in the receive<br />

buffer of communication channel "uart2:" is calculated:<br />

100 OPEN "uart2:" FOR INPUT AS #2<br />

110 A%=LOF(2)<br />

120 PRINT A%<br />

1 0 <strong>Intermec</strong> Fingerprint <strong>v8.70.0</strong>/v10.0.0 Programmer´s <strong>Reference</strong> <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!