Error: Unexpected end of format string in format string in Fortran

前端 未结 2 484
被撕碎了的回忆
被撕碎了的回忆 2021-01-24 10:13

Getting this error while trying to compile a copied code from a Fortran 77 program.

code:

900 FORMAT(1H0,2X,\'ABSOLUTE GRID LIMITS FOR DATA RETENTION FO         


        
2条回答
  •  耶瑟儿~
    2021-01-24 11:00

    Your line is too long.

    In free form files (.f90) you can only use 132 character lines. You can break your line and continue on the next line. Put & character at the end of the line before continuing on the next line.

    In fixed form Fortran (.f .for) you can only use 72 character lines. You can break your line and continue on the next line. Put any character to the fifth column on the present line.

    There are compiler options which can loosen these restrictions.

提交回复
热议问题