Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Microsoft WORD sizes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 incertia   Crossbones+   -  Reputation: 779

Like
1Likes
Like

Posted 10 April 2013 - 06:52 PM

I've heard that Microsoft WORD will always be 16-bit and DWORD will always be 32-bit. Is this because they change the types (say from unsigned long to unsigned short) whenever the system WORD size changes?
what

Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 21340

Like
5Likes
Like

Posted 10 April 2013 - 07:06 PM

Microsoft® Visual Studio® uses the LLP64/IL32P64 data model which ensures that shorts are always 16 bits, ints and longs are always 32 bits, long long/long int are always 64 bits, etc.

 

In this case that means there is no need to change the typedef between compiler settings, but if the sizes were to change the WORD and DWORD typedefs would change to ensure their sizes remain 16- and 32- bits respectively.

 

If you are worried about sizes on Microsoft® Visual Studio® you can always use the __int16 and __int32 family of primitives.

 

 

L. Spiro






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS