Mail Archives: djgpp/1997/07/28/10:04:45
On Thu, 24 Jul 1997, John M. Aldrich wrote:
> A. Sinan Unur wrote:
> >
> > > > do you ever expect to read a fractional number of bytes from a file?
> > >
> > > No, I just used it cause I always think of doubles as being able to
> > > count to a higher number than ints.
> >
> > for reasons that are too mundane to explain and take up bandwidth with,
> > that is not a good idea. if you insist, you can do it of course, but you
> > will be in for a pretty hectic ride.
>
> If, for some reason, you seriously expect that your program might read
> more than 4 billion bytes of data from a file, you can use the long long
> integer type. This is a 64 bit integer; the upper limit of which is
> approximately 1.845 x 10^19. It's gcc-specific, but involves less
> overhead than float->int conversions.
>
> BTW, I just wrote a little program to print out the maximum value of a
> 64 bit integer:
>
> 18446744073709551615
Unsigned. Signed that would be:
9223372036854775807
JMTC
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -