In 2017, are unsigned integers in standard Fortran, or is it still a maybe not portable extension of some compilers?
The Fortran 95 compiler accepts a new data type, UNSIGNED , as an extension to the language. Four KIND parameter values are accepted with UNSIGNED : 1, 2, 4, and 8, corresponding to 1-, 2-, 4-, and 8-byte unsigned integers, respectively.
The XDR standard defines signed integers as integer. A signed integer is a 32-bit datum that encodes an integer in the range [-2147483648 to 2147483647]. An unsigned integer is a 32-bit datum that encodes a nonnegative integer in the range [0 to 4294967295].
Traditionally there are two different real types, the default real type and double precision type. However, Fortran 90/95 provides more control over the precision of real and integer data types through the kind specifier, which we will study in the chapter on Numbers.
The INTEGER statement specifies the type to be integer for a symbolic constant, variable, array, function, or dummy function. Optionally, it specifies array dimensions and size and initializes with values.
No, they are not standard and there is no active draft or similar activity in the committee to make them standard.
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