Re: long vs. int

From: Herbert Kremser (kremser@flinux.tu-graz.ac.at)
Date: 09/21/95


On Wed, 20 Sep 1995, Matthew T. Churilla wrote:

> first it is approx 21M or 2^31.  And second on just about every UNIX or unix 
> like platfor that I have seen int is defined as the same size as long.
Nonsense, this has nearly nothing to do with unix.
This is true for most 32 bit systems, though unix has nothing to do with
32 bit. You obviously haven't seen any 64 bit systems yet, where most
probably int is 32 bit and long is 64 bit, but of course int could be
64 bit without any problems too.
All you can rely on is int beeing >= 16bit and long >= 32bit.

> To see the size of your variables check out the limits.h file.  This is a 
> system file that contains alot of the maximums and length definiations of
> types.  And lastly if that doesnt work run your debugger and send a block
> of code around the bad area and the error message.  

Herbert


[on public request 12 lines of signature deleted]  *snip* ;)



This archive was generated by hypermail 2b30 : 12/07/00 PST