Jump to content

  • Log In with Google      Sign In   
  • Create Account

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: 13576

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


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums




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