Intermec PM43/PM43c Fingerprint Developer's Guide (PC23d, PC43d/t, PM23c, PM43 - Page 71
Printing Expressions to a Sequential File With PRINT#
View all Intermec PM43/PM43c manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 71 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 56. 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 57. 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 47. LOF returns the length (in bytes) of a file that has been opened. For an example, see "Determining File Length with LOF" on page 47. Fingerprint Developer's Guide 59