Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CHECKSUM
Message
De
18/12/2000 06:50:17
 
 
À
18/12/2000 03:38:23
Edward See
Magicalogic Consultancy System
Quezon, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00454593
Message ID:
00454616
Vues:
30
>This is my first time in the forum.
>I would like to ask for help on how to generate by code the 13th number (it is a checksum) from the first 12 numbers of an EAN13 barcode
>This is done automatically by barcode printers. How do we do it in VFP ?

Hi Edward,

The check character for the UPC/EAN codes is generated by the following method:

1.Designate the rightmost character odd.
2.Sum all of the characters in the odd positions and multiply the result by three.
3.Sum all of the characters in the even positions
4.Add the odd and even totals from steps two and three.
5.Determine the smallest number that when added to the result from step four, will result in a multiple of 10. This is the check character.

EAN 13 Example:

Flag characters = 20
Message characters = 0123456789
Position = EOEOEOEOEOEO
Sum of odd positions = 0 + 1 + 3 + 5 + 7 + 9 = 25
Odd positions X 3 = 25 x 3 = 75
Sum of even positions = 2 + 0 + 2 + 4 + 6 + 8 = 22
Sum of even and odd = 75 + 22 = 97
Check character = 3
Tag to be encoded = 2001234567893

More info available at : http://www.semiconductor.agilent.com/barcode/sg/Misc/upc.html#A1.4.2.1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform