Subject: Re: max int value
To: Peter Seebach <>
From: Fong Siu Lung Gordon <>
List: current-users
Date: 05/16/2000 14:33:36
On Tue, 16 May 2000, Peter Seebach wrote:

> In message <>, Fong
>  Siu Lung Gordon writes:
> >Sorry for not detail describe my problem.  The problem is to calculate the
> >check digit for barcode which is use as the borrow card number (14 digits
> >long).  However, my system (i386) only count the first 10 digits only. any
> >clue. ?  Thanks.
> Yes, don't use integer types.  You're working with a string, not a number.
> (Seriously; I did barcode software in another incarnation, back at Xerox.
> What you have is *NOT* a number; it is a 14-character string which happens
> to contain digits.)

Yes, 14-character. My method is to individually cut the 14-character into
14 tokens and calculate the check digit from these tokens.  It works.  The
problem is I have to calculate the check digit for a series of borrow card
not just one and I don't to type it again and again.  The method I though
of is to make a copy the start borrow card and increment by 1 each time.
Then re-calculate the check digit and the new borrow card number.  The
probelm is max int of my system (i386) is largest enough to hold the
14-charater digit.  That is the point.


> -s