Microsoft WORD sizes

Started by
0 comments, last by L. Spiro 11 years ago
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
Advertisement

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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

This topic is closed to new replies.

Advertisement