Intermec PX6i Fingerprint Developer's Guide (old) - Page 77
Printing Expressions to a Sequential File With PRINT#
View all Intermec PX6i manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 77 highlights
Chapter 4 - Managing Input and Output Printing Expressions to a Sequential File With PRINT# PRINT# prints data entered as string or numeric expressions to a sequential file. For more information, see "Printing Expressions With PRINT" on page 58. There are two ways to divide the file into records: • Each PRINT# statement creates a new record as seen in lines 20-40 in the example. • Commas inside a string divide the string into records, as seen in line 50 in the example. Example: 10 OPEN "QFILE" FOR OUTPUT AS #1 20 PRINT #1, "Record A", "a", "b", "c" 30 PRINT #1, "Record B", 1, 2, 3 40 PRINT #1, "Record C", "x"; "y"; "z" 50 PRINT #1, "Record D,Record E,Record F" Printing Characters by ASCII Values With PRINTONE# The PRINTONE# statement prints characters entered as decimal ASCII values according to the selected character set to the selected file or device. For more information, see "Printing Characters by ASCII Values With PRINTONE" on page 59. This example prints two records ("Hello" and "Goodbye") to "FILE1": 10 OPEN "FILE1" FOR OUTPUT AS 55 20 PRINTONE#55,72;101;108;108;111 30 PRINTONE#55,71;111;111;100;98;121;101 Using a CLOSE Statement After writing data to the file, CLOSE it using the same reference number as when it was OPENed, as in this example: 10 OPEN "FILE1" FOR OUTPUT AS 55 20 PRINTONE#55,72;101;108;108;111 30 PRINTONE#55,71;111;111;100;98;121;101 40 CLOSE 55 Counting Data Blocks and Determining File Length With LOC and LOF Use LOC to return the number of 128-byte blocks that have been written since the file was opened. For an example, see "Counting Data Blocks With LOC" on page 49. LOF returns the length (in bytes) of a file that has been opened. For an example, see "Determining File Length With LOF" on page 49. Intermec Fingerprint Developer's Guide 61