Denso BHT-400-CE Reference Manual page 110

Bar code handy terminal class library reference manual
Table of Contents

Advertisement

Note
If the barcode data within the code (excluding the check digit positions) contains any
characters outside the character set corresponding to the barcode type specified by the
check digit type, this function returns "0" and throws an exception. However, if only the
check digit positions contain a character outside the valid character set, then this function
calculates the correct check digit and returns it as a single-character string.
[VB] Scanner.GetChkDigit("494AB4458", "A")
[C#] Scanner.GetChkDigit("494AB4458", "A")
Since "A" and "B" lie outside the valid character set for EAN (JAN) or UPC, "0" is returned
and an exception is thrown.
[VB] Scanner.GetChkDigit("4940045X", "A")
[C#] Scanner.GetChkDigit("4940045X", "A");
"X" lies outside the valid character set but is in the CD position, and therefore the correct
CD (ASCII "8") is calculated and returned.
[VB] Scanner.GetChkDigit("a0ef3-a", "N")
[C#] Scanner.GetChkDigit("a0ef3-a", "N");
Since "e" and "f" lie outside the valid character set for Codabar (NW-7), "0" is returned and
an exception is thrown.
[VB] Scanner.GetChkDigit("a123Qa", "N")
[C#] Scanner.GetChkDigit("a123Qa", "N");
"Q" lies outside the valid character set but is in the CD position, and therefore the correct
CD (ASCII "-") is calculated and returned.
- 104 -

Advertisement

Table of Contents
loading

Table of Contents