- #1
MathematicalPhysicist
Gold Member
- 4,699
- 373
I read the following paragraph in the book: "Guide to Fortran 2008 programming":
And then they provide a programming code:
I can of course change real to integer to logical to character etc.
But I don't understand what are the numbers that are shown in the screen? what do they designate?
For real_kinds I get:
4 8 10 16
For logical_kinds I get:
1 2 4 8 16
For character_kinds I get:
1 4
and for integer_kinds the same as logical.
What do these numbers designate?
The text doesn't clarify it to me.
It is possible to determine which kind parameters are available for each type on
your system by using the parameters real_kinds , integer_kinds , logical_kinds ,
and character_kinds in the intrinsic module iso_fortran_env .
And then they provide a programming code:
Fortran:
program kinds
use iso_fortran_env
implicit none
print *, real_kinds
end program kinds
I can of course change real to integer to logical to character etc.
But I don't understand what are the numbers that are shown in the screen? what do they designate?
For real_kinds I get:
4 8 10 16
For logical_kinds I get:
1 2 4 8 16
For character_kinds I get:
1 4
and for integer_kinds the same as logical.
What do these numbers designate?
The text doesn't clarify it to me.