Anonymous user
Host introspection: Difference between revisions
→{{header|Nim}}
(To find the word size, replaced the computation using log2 by a call to "countSetBits" from module "bitops".) |
|||
Line 687:
=={{header|Nim}}==
In Nim, "int" type has the size of the word. So, to find the word size, just count the number of bits set in the "int" -1.
<lang nim>import bitops
echo cpuEndian
|