and BEEP! my barcode scanner likes it.
function calcstring(x as string)
a=x
checksum = 104 'symbol for 209
for position = 1 to len(a)
checksum = checksum+(asc(mid(a,position,1))-32)*position
next position
checksum = checksum mod 103
calcstring = chr(209)+a+chr(checksum+32)+chr(211)
'start code B, then string, then checksum, then stop code
end function

No comments:
Post a Comment