Calculate check digit for ean13 bar code ? 
Author Message
 Calculate check digit for ean13 bar code ?

Hi !

    Please, does somebody know how to calculate check digit for EAN13
barcode !

    Thanks.



Tue, 17 Jun 2003 04:40:45 GMT  
 Calculate check digit for ean13 bar code ?
dr. V.

Try the following link for an example

http://www.ean-int.org/index800.html

--
HTH
Steve Quinn
If you're too open minded, your brains will fall out.
Age is a very high price to pay for maturity.
Artificial intelligence is no match for natural stupidity.


Quote:
> Hi !

>     Please, does somebody know how to calculate check digit for EAN13
> barcode !

>     Thanks.



Tue, 17 Jun 2003 06:17:17 GMT  
 Calculate check digit for ean13 bar code ?
Hi,

an explanation of EAN13 algorithm can be found at :
http://www.mecsw.com/specs/ean_13.html

Regards,
Paolo R.



Quote:
> Hi !

>     Please, does somebody know how to calculate check digit for EAN13
> barcode !

>     Thanks.



Tue, 17 Jun 2003 07:38:02 GMT  
 Calculate check digit for ean13 bar code ?

Quote:

> Hi !

>     Please, does somebody know how to calculate check digit for EAN13
> barcode !

>     Thanks.

FUNCTION ean13(riba)
LOCAL j,a,b,c
IF LEN(ALLTRIM(riba)) = 12  .AND. LEFT(ALLTRIM(riba),1) != '0'
  FOR j:=1 TO 12
    IF !ISDIGIT(SUBSTR(riba,j))
      RETURN riba
    ENDIF
  ENDFOR
  a:=VAL(SUBSTR(riba,2,1))+VAL(SUBSTR(riba,4,1))+;
     VAL(SUBSTR(riba,6,1))+VAL(SUBSTR(riba,8,1))+VAL(SUBSTR(riba,10,1))+;

     VAL(SUBSTR(riba,12,1))
  a:=a*3
  b:=VAL(SUBSTR(riba,1,1))+VAL(SUBSTR(riba,3,1))+ ;
     VAL(SUBSTR(riba,5,1))+VAL(SUBSTR(riba,7,1))+VAL(SUBSTR(riba,9,1))+;
     VAL(SUBSTR(riba,11,1))
  a:=a+b
  IF ( a % 10 ) <> 0
    c:=(INT(a/10)+1)*10
  ELSE
    c:=a
  ENDIF
  check:=ALLTRIM(STR(c-a))
  riba+=check
ENDIF
RETURN riba

Happy New Year !!
Kuido



Tue, 17 Jun 2003 18:43:25 GMT  
 Calculate check digit for ean13 bar code ?
On Thu, 28 Dec 2000 21:40:45 +0100,

Quote:

>Hi !
>    Please, does somebody know how to calculate check digit for EAN13
>barcode !

function Ean13CC(code)
local i, cc :=0
for i:=1 to 12
  cc+=(asc(substr(code,i,1))-48)*iif(i%2==1,1,3)
next
cc:=(10-(cc%10))%10
return ( cc )

regards,
Przemek



Wed, 18 Jun 2003 23:42:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Calculating on 20 digits ammount?

2. Program to calculate pi with lots of digits

3. Tcl Strings To Calculate With 60-Digit Integers

4. code needed for computing 2-digit dpbc address code

5. Ean8 check digit

6. check digit ISO 7064 MOD 11, 10

7. bank account check digit

8. check digit algorithm in cobol?

9. Student needs help wtih Modulo 11 check digit.

10. Check Digit

11. Mod 11 Check digit routine

12. Student needs help wtih Modulo 11 check digit.

 

 
Powered by phpBB® Forum Software