Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal constants for KIND are semantically non-portable #85

Open
ThemosTsikas opened this issue Oct 19, 2021 · 0 comments
Open

Literal constants for KIND are semantically non-portable #85

ThemosTsikas opened this issue Oct 19, 2021 · 0 comments

Comments

@ThemosTsikas
Copy link

Hello,
I see you use "Real(kind=8)" and similar a lot. A real kind with value 8 might not exist on a compiler/machine, or might mean different things than what you seem to expect (an 8-byte real). The portable way to use KIND numbers is to ask the compiler, either via SELECTED_REAL_KIND/SELECTED_INT_KIND where you state your desired precision and range, or via the defined constants INT32/INT64/REAL32/REAL64 in intrinsic module ISO_FORTRAN_ENV where you state the storage size in bits needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant