UBI EasyCoder 201 IISA Manuál s instrukcemi Strana 63

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 181
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 62
62
Intermec Fingerprint 6.13 – Programmer's Guide
6. FILE SYSTEM, cont'd.
10. Arrays, cont'd.
CSUM
The checksum for string arrays can be calculated according to one
of two different algorithms (LRC or DRC) and returned by means
of the CSUM statement.
In this example, the checksum of a string array is calculated
according both to the LRC (Logitudinal Redundancy Check) and
the DRC (Diagonal Redundancy Check) algorithms:
10 FOR Q%=0 TO 3
20 A$=STR$(Q%)
30 ARRAY$(Q%)="Element No. "+A$
40 NEXT
50 CSUM 1,ARRAY$,B%:PRINT "LRC checksum: ";B%
60 CSUM 2,ARRAY$,C%:PRINT "DRC checksum: ";C%
RUN
Yields:
LRC checksum: 0
DRC checksum: 197
Note!
Do not confuse CSUM with CHECKSUM,
see chapter 6.9.
Zobrazit stránku 62
1 2 ... 58 59 60 61 62 63 64 65 66 67 68 ... 180 181

Komentáře k této Příručce

Žádné komentáře