

Portable Code: How To Check If A Machine Is 32 Bit Or 64 Bit - shantanugoel
http://www.safercode.com/blog/2009/03/10/portable-code-how-to-check-if-a-machine-is-32-bit-or-64-bit.html
Writing portable code is very important but it is one of the aspects that most people neglect until it is too late to realize its importance. Till few years ago, most people writing code for personal computers were not worried about the data sizes on their machines. They didn’t even think whether the machines, on which their code would be running, would be 32 bit or 64 bit.
======
jwilliams
Not really sure how useful this is... even if it was practical to adapt
datatypes at runtime, it would still be extremely painful. Surely just using
portable types is vastly easier and straightforward.

(or am I missing something?)

~~~
shantanugoel
Yes, using portable data types is much easier. But I thought about this when
we had to make our code work with some legacy code (which we couldn't change)
and the outputs were in non-portable data types.

