We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
save
Initialisation in declarations gets an implicit save, meaning the initialisation is not done on subsequent entry into the routine.
Bad:
subroutine foo() integer :: bar = 1 end subroutine
Good:
subroutine foo() integer, save :: bar = 1 end subroutine
Also good:
subroutine foo() integer :: bar bar = 1 end subroutine
The text was updated successfully, but these errors were encountered:
Glad you've raised this, because I wasn't aware of this behaviour. Might have to go back to edit some old code I wrote...
Sorry, something went wrong.
No branches or pull requests
Initialisation in declarations gets an implicit
save
, meaning the initialisation is not done on subsequent entry into the routine.Bad:
Good:
Also good:
The text was updated successfully, but these errors were encountered: