I presume that in Standard ML :
On 64 bit linux is int also 32 bit? Furthermore is there a place (url) where the size of different datatypes is outlined, for Standard ML? Thanks
The size of integers is implementation-specific - it's not specified by the standard. In MoscowML uses 31-bit integers on 32-bit platforms and 63-bit integers on 64-bit platforms according to its documentation.
SML/NJ apparently uses 31-bit integers on both 64-bit and 32-bit systems (I say apparently because I didn't find this documented anywhere - I just tested it on my 64-bit machine).
In MLton the size of Int can even be set using the -default-type command line argument to the compiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With