Include both .f and .F90 file in Fortran main file header

前端 未结 1 885
时光说笑
时光说笑 2020-12-21 15:43

I am using some F77 fixed format code with my F90 program. I am trying to include both kinds of code in my main program. Here\'s how I have arranged my code:

Header

相关标签:
1条回答
  • 2020-12-21 16:20

    There are compiler specific directives (not part of the standard language), for that compiler, that allow you to change the source form in use.

    Place the relevant directive before the include file, and then place the other directive after the include file to switch the source form back. Perhaps:

    !DEC$ NOFREEFORM
          INCLUDE 'lapack.inc'
    !DEC$ FREEFORM
    

    See http://software.intel.com/en-us/node/466230 for more information.

    0 讨论(0)
提交回复
热议问题