Specifications

Chapter 15. Function Reference
344
When
CDtype is I (ITF), the length of barcodedata must be an even num-
ber of two or more digits. If not,
CHKDGT$ 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$("123457","I")="7"
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 "12345"+CHKDGT$("12345"+"0","I")
When CDtype is M (Code 39), the length of barcodedata must be two or
more digits except for start and stop characters. If not, CHKDGT$ 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$("CODE39W","M")="W"
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 "CODE39"+CHKDGT$("CODE39"+"0","M")
123457
CODE39W