Intermec PX4i Fingerprint Developer's Guide (old) - Page 67
Closing a File, Finding the Last Field Read With LOC, Determining File Length With LOF
View all Intermec PX4i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 67 highlights
Chapter 4 - Managing Input and Output Now you can use the variables assigned to the fields using the FIELD statement to handle the data. Numeric expressions converted to string format before being put into the record can now be converted back to numeric format using VAL functions. In this example, the following code displays the data on the host screen: 40 PRINT F1$,F2$,F3$ Closing a File Finally, close the file and execute: 50 CLOSE #1 RUN The printer returns: ABC DEF 123456 Finding the Last Field Read With LOC LOC returns the number of the last record read by the use of GET statement. This example closes the file "ADDRESSES" when record number 100 has been read from the file: 10 OPEN "ADDRESSES" AS #1 200 IF LOC(1)=100 THEN CLOSE #1 ..... ..... Determining File Length With LOF 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 Input From the Printer Keypad The input that can be provided from the printer keypad depends on your printer model and options. Note: This section does not apply to keypad input for ON KEY...GOSUB statements and vice versa. The following Fingerprint commands are used in connection with input from the printer keyboard: • OPEN (opens the device "console:" for sequential INPUT) • INPUT# • INPUT$ Intermec Fingerprint Developer's Guide 51