Mail Archives: djgpp/1998/01/20/15:07:18
Andy Fung wrote:
>
> >It is indeed possible. Use long long int. You can try following code:
> >
> >main() {
> > printf("%d\n", sizeof(long long int));
> > }
>
> Strange, since an int is 32bit, I wonder 64bit integer are not declared at
> long int instead.
In DJGPP a long int and an int are both 32 bits. Other implementations
have 16 bit ints and 32 bit long ints.
I believe that in C an int is defined as the default width of an
internal register in the CPU. Therefore, in the history of 16 bit CPU's
ints were by default 16 bits. On these old implementations of C a long
always has been 32 bit.
There is probably more info on the internet about this.
> Also, is it possible to use shifting of more than 32bits. I.E. :
> mynum << 48;
I never actually USED long long int. Maybe you should write a short test
program to see what can and what can't be done.
While you're at it -> please let me know the results :)
- Raw text -