Search code examples
windowstypesterminology

What does "integral type" mean?


Raymond Chen said at his blog post,

The integral types WPARAM, LPARAM, and LRESULT are 32 bits wide on 32-bit systems and 64 bits wide on 64-bit systems. What happens when a 32-bit process sends a message to a 64-bit window or vice versa?

Why did he use the term 'integral types'? I haven't heard it yet. What does it mean?


Solution

  • Integral types are data types which store integer numbers. ie distinct from floating point data type, strings, etc.

    Why does he use the term here?

    These data types have a particular property due to their structure, which means that they will have different storage capacities on systems with different 'word' sizes (a 'word' being a chunk of data which the computer can access in one go: ie 32 bits on a 32-bit processor, 64 bits on a 64-bit processor, etc).

    Virtually all integer data in a computer is stored in whole 'words', and he is explaining that integer data types will vary in size according to the host computer.

    He didn't really need to use the word 'integral'; simply listing the affected data types as he does is sufficient to tell you that these data types behave in this way. But by adding the word 'integral' to the sentence, he is implicitly emphasising the reason why they work this way.

    (I guess this is as much of a linguistic question as a programming one)