Specifications
343
Sample coding 4:
CD.Data$=CHKDGT$("a123Qa","N")
"Q" is a CD position character, so CHKDGT$ calculates the
correct CD and
CD.Data$ will become "-."
■ When
CDtype is A (EAN or UPC), CHKDGT$ identifies the EAN or UPC of
barcodedata depending upon the data length (number of digits) as listed
below.
If the data length is a value other than 13, 8, and 7, this function returns a null
string.
- To check that the CD is correct:
Pass a CD-suffixed barcodedata to a CHKDGT$ as shown below. If the
returned value is equal to the CD, the CD data is suitable for the
barcodedata.
Sample coding:
IF CHKDGT$("49400458","A")="8"
THEN...
- To add a CD to barcode data:
Pass
barcodedata followed by a dummy character to a CHKDGT$ as shown
below. The returned value will become the CD to be replaced with the dummy char-
acter.
Sample coding:
PRINT"4940045"+CHKDGT$("4940045"+"0","A")
■ When CDtype is H (STF)*, the length of barcodedata must be two or more
digits. If not,
CHKDGT$ returns a null string.
(*
Supported by the BHT-100B only.)
- To check that the CD is correct:
Pass a CD-suffixed
barcodedata to a CHKDGT$ as shown below. If the
returned value is equal to the CD, the CD data is suitable for the
barcodedata.
Sample coding:
IF CHKDGT$("12345678905","H")="5"
THEN...
- To add a CD to barcode data:
Pass barcodedata followed by a dummy character to a CHKDGT$ as shown
below. The returned value will become the CD to be replaced with the dummy char-
acter.
Sample coding:
PRINT"1234567890"+CHKDGT$("1234567890"+"0"."H")
Data length of barcodedata
Universal Product Codes
13 digits EAN-13 or UPC-A
8 digits EAN-8
7 digits UPC-E
49400458
12345678905