-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix "implicit none" usage #10
Comments
Yeah, I agree that this is unnecessary. This is done for the sake of older Fortran programmers so that they are reminded that each function does not have implicit typing. Since it does not actually affect the compilation of the code and may avoid problems I tend to put that statement in every subroutine. Or perhaps there is a reason not to put that in everywhere? |
It all depends on what culture you want to create in the project. I would assume that people will send PRs with additions, so it's easy to check that there is The reason not to put it everywhere is simply to keep the code short and consistent. |
That is a good point, the compiler will inform people of their mistake before it gets too far along. Also, with the travis builds it will be easier to make sure someone does not accidentally do something and break everything. Let's remove them. |
Note that we can go even further and write a simple Python script that checks all .f90 module files to have "implicit none" at the module level. This will then naturally fail at Travis. This script might be reusable in other Fortran projects as well. There really should be a compiler option that does this particular check, but unfortunately I am not aware of any, except Update: gfortran also has |
Looks like it's not supported very widely anyway. I would say remove the |
Cool. I'll send a PR later. |
There should be exactly one
implicit none
in each module at the top. No function in that module should have it, as it is redundant (the module one applies to all functions in the module). I'll send a PR once #9 is in, to avoid merge conflicts.The text was updated successfully, but these errors were encountered: