Intel fortran compiler (2024.2.0.633), Visual Studio 2022, 32bit. Compiling .for files from very old fortran routines.
Code did not copy well into code tags, so I pasted an image. Problem:
C:\Users\irhfvx\source\repos\NOE-FortranCoilSourceFiles\ForR69Cond\R69_Cond.for(2162): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: :: ) ( , : * . % + - [ . = ** / // .LT. < .LE. <= .EQ. == ...
CALL LOGMEAN(TR1G,TRSATL,TAB23,TAB12,DTMKEY,FLOW,DTMZ(2),THRMLMTD)
--------------------------------------------------------------------------^
This compiler error is returned for each line that has the Call to LogMean. I cannot figure out what the problem is. LOGMEAN is just a routine. I have checked everything I can think of. Can someone point me in the right direction on how to resolve this?
From the screenshot and the grey-ish background of the editor, there's a strong indication that you're trying to compile a file that does not adhere to fixed-form Fortran requirements (code in col 7 - 72, col 1 comment charactor, col 2-5 label, col 6 continuation character).
Due to the .FOR
extension, the compiler thinks that this a fixed-form file. You can use -free
on Linux to override the compiler's decision. I'm not a true Windows user, but it seems that if you rename the files to have the .F90
extension, the compiler will assume the source code is free-form Fortran code.