Newsgroups: comp.os.msdos.djgpp From: "A. Jans-Beken" Subject: Re: 64 bit integers ??!? Content-Type: text/plain; charset=us-ascii Message-ID: <34C4C458.6BD2@oce.nl> Sender: news AT oce DOT nl (The Daily News @ nntp01.oce.nl) Content-Transfer-Encoding: 7bit Organization: Océ-Nederland B.V. References: <69tlsd$lk2 AT examiner DOT concentric DOT net> <34C34232 DOT 1DC AT oce DOT nl> <6a074r$gu4 AT examiner DOT concentric DOT net> Mime-Version: 1.0 Date: Tue, 20 Jan 1998 15:35:52 GMT Lines: 27 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 :)