Jump to content

Host introspection: Difference between revisions

(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
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.