Intermec PD41 Fingerprint Developer's Guide (old) - Page 54
Commands for Transferring Files Between Printers, Checking Transferred Files With CHECKSUM
View all Intermec PD41 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 54 highlights
Chapter 3 - Managing Files 2-element string array (requires no DIM stmt) Element 0 returns: Type of protocol: "KERMIT" or "ZMODEM" Element 1 returns: Last file name received Example: 10 TRANSFER KERMIT "R" 20 DIM A%(4) 30 TRANSFER STATUS A%,B$ 40 PRINT A%(0), A%(1), A%(2), A%(3), A%(4) 50 PRINT B$(0), B$(1) RUN Commands for Transferring Files Between Printers If you want to transfer a file from one printer to another printer, start by transferring the file to the host. Then disconnect the first printer and download the file to the second printer (or have the two printers connected to separate serial ports). After the transfer, check if the transfer was successful by comparing the result of CHECKSUM functions on both printers. Checking Transferred Files With CHECKSUM Calculate the CHECKSUM on the program in the transmitting printer before the transfer. After the transfer is completed, LOAD the program in the receiving printer and perform the same calculation. If the checksums are identical, the transfer was successful. Note: Do not confuse CHECKSUM with CSUM. For more information, see "Commands for Working With Arrays" on page 38. In this example, the checksum in the lines 10 to 90,000 of a program is calculated: "DEMO.PRG." LOAD "DEMO.PRG" PRINT CHECKSUM (10,90000) Commands for Working With Arrays Variables containing related data may be organized in arrays. Each value in an array is called an element. The position of each element is specified by a subscript, one for each dimension (maximum 10.) Each array variable consists of a name and a number of subscripts, separated by commas, and enclosed by parentheses, as in this example: ARRAY$(3,3,3) The first time an array is referred to, the number of subscripts in an array variable decides its number of dimensions. The number of elements in each dimension is restricted to four (numbered 0 to 3) by default. There are four commands that are particularly relevant for working with arrays: • DIM specifies the size of an array in regard of elements and dimensions. 38 Intermec Fingerprint Developer's Guide