Unclassifiable Statement at SUBROUTINE declaration inside a PROGRAM

前端 未结 2 1524
无人共我
无人共我 2021-01-22 12:07

So I\'ve written a basic Vigenere Cypher in Fortran 90, however when I try to compile it, I am hammered with Unclassifiable Statement Errors due to my internal SUBROUTINES.

2条回答
  •  广开言路
    2021-01-22 12:48

    You are missing CONTAINS before your subroutine.

    In the future learn modules, but now use CONTAINS to make those subroutines properly internal to the main program.

    So it should look like

    PROGRAM Assign_8
      ...
    
      CALL Validation_Sub
    
    CONTAINS
    
      SUBROUTINE Validation_Sub(Path, Validation)
      END SUBROUTINE
    
      ...
    
    END PROGRAM Assign_8
    

提交回复
热议问题