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

Some fortran subroutines don't use IMPLICIT NONE #92

Closed
edwardhartnett opened this issue Oct 15, 2021 · 0 comments · Fixed by #93
Closed

Some fortran subroutines don't use IMPLICIT NONE #92

edwardhartnett opened this issue Oct 15, 2021 · 0 comments · Fixed by #93
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Contributor

edwardhartnett commented Oct 15, 2021

We have code like this:

SUBROUTINE BAOPEN(LU,CFN,IRET)
  USE BACIO_MODULE
  CHARACTER CFN*(*)
  CHARACTER(80) CMSG
  integer(kind=8) IB,JB,NB,KA

  IF(LU.LT.001.OR.LU.GT.FDDIM) THEN
     IRET=6
     RETURN
  ENDIF

  IRET=BACIOL(BACIO_OPENRW,IB,JB,1,NB,KA,FD(LU),CFN,A)
END SUBROUTINE BAOPEN

Note that there is no IMPLICIT NONE, the variable CMSG is never used, and the variables LU, IRET, and A are never defined.

Also note that the INTENT for LU, CFN, and IRET can be declared but isn't.

IMPLICIT NONE is a great thing for every fortran program and subprogram. We need to use it everywhere we can.

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

Successfully merging a pull request may close this issue.

1 participant