How big is an Int?

Monkey Forums/Monkey Programming/How big is an Int?

GfK(Posted 2011) [#1]
I read somewhere (either the forums or documentation) that an Int "is always at least four bytes".

Can anybody clarify that? Is an Int eight bytes on some platforms?


Goodlookinguy(Posted 2011) [#2]
If I recall correctly, all platforms except HTML5 are dword. I believe Javascript (HTML5 Platform) stores dynamically sized numbers or as qword on most browsers.


GfK(Posted 2011) [#3]
...4 bytes then?


Goodlookinguy(Posted 2011) [#4]
byte or 8-bit int = 1 byte
word or 16-bit int or short = 2 bytes
dword (double word) or 32-bit int: 4 bytes
qword (quad word) or 64-bit int or long int: 8 bytes

So yes, 4 on most platforms, excluding Javascript.