Syntax error in call statement in Fortran

前端 未结 1 2498
迷失自我
迷失自我 2020-12-22 03:27

I have written a simple test program to try subroutines and the call statement in Fortran. I am using gfortran compiler in GNU/Linux. I have declared 14 parameters which are

相关标签:
1条回答
  • 2020-12-22 03:58

    Files with a .for or .f extension, by convention, are treated as fixed form source. Statements on fixed form lines must go in between columns 7 and 72, inclusive. Note the column position in the error message - the end of your statement is being chopped off.

    Fixed form source is also not sensitive to whitespace. All the parameter kxxx assignment statements before the call statement don't do what you think.

    Do not use fixed form source unless you are modifying existing legacy code.

    Do not use implicit typing unless you are modifying existing legacy code (or perhaps engaging in some esoteric application of generic programming). IMPLICIT NONE is your best friend.

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