• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

int bigger than long int?

Calin

Diamond Member
As I know, the int data type in C have a width equal to the width of processor (well, and operating system). So, a int is 16 bit on a 286, and 32 bit on a 386.
Unlike this, the long int has a width of 32 bits, independent of architecture.
My question is: On a Athlon XP (or Intel Itanium) running a 64-bit operating system the int data type is 64 bits wide, and long int is only 32 bits wide?

Calin
 
First, Athlon XP's aren't 64-bit.

Second, Usually 64-bit systems will have long and int both be 32-bits for compatibility reasons, but you should never assume that. You'll have to check the documentation for each architecture you plan on supporting.
 
Yes, I only now realize that. I wanted to refer to the new 64-bit architecture of AMD, the Opteron (I think this was called)
And I know in M$ Visual C++, there is a __int64 data type (64-bit wide), for explicit use of 64-bit values

Thanks
 
Yes, I only now realize that. I wanted to refer to the new 64-bit architecture of AMD, the Opteron (I think this was called)

IIRC the server version will be called Opteron and the workstation one will just be Athlon64.

And I know in M$ Visual C++, there is a __int64 data type (64-bit wide), for explicit use of 64-bit values

Refer to a similar discussion here

Not to 'advertise' for other forums, but the Arstechnica Programmer's Symposium is a great resource for programming questions, there's many professional (and non-professional but just really good) programmers there.
 
Back
Top