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
Summary of Contents for BHT-BASIC 100 SERIES
Page 1: ......
Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...