At 11:05 2014-10-02, Paul Hill <[email protected]> wrote:
On 2 October 2014 13:56, Koen Piller <[email protected]> wrote:
> Hi
> You could consider to include in the serial# a control bit that way your
> people are free to scan or type the serial# if the number keyed in does not
> pass the controlebit validation it will not be accepted.
> An easy way would be: ( 1ste bit x 7) + ( 2nd bit x 7-1) etc till 7th bit
> that Sum diveded by 8  the 8th bit would make the Sum to a mod(Sum,8) = 0
> No typing errors anymore.

Koen here has a very good point.  Are you printing bar codes *without*
a checksum?
I don't think I've ever seen a barcode without one.

Most use Modulo 7 or 11 which should be trivial to implement in Fox.

     Be careful what you use.  Koen's example is flawed.

Take the digit that is multiplied by 4. Any even digit in that position will result in the same checksum digit. Any odd digit in that position will result in the same checksum digit.

For the digit multiplied by 1, 0 and 8 will result in the same checksum, and so will 1 and 9.

     There is a reason why 7 and 11 are used: relative primeness.

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to