"I have to mix f77 and modern fortran source code. In F77 sources files some #include…
Private research annotation
Sign in to add a private research label or note.
- User
"I have to mix f77 and modern fortran source code. In F77 sources files some #include are used inside subroutines in order to declare variables (local or passed in arguments) subroutine hello(v1, v2) implicit none c v1 and v2 are declared here: #include "somevars.h" c also v3 v3 = v1 + v2 end subroutine hello I cannot modify somevars.h, also being in fixed form fortran it cannot be included as this in a modern free format source code. I want to use somevars.h in my modern fortran code. I am planning to parse the .h file with python fparser and output a new free format header, but it needs to be encapsulated in a function or a module and then the encapsulation must be removed by some grep -v. Is there a better solution ? "
- Assistant