wnning 发表于 2024-4-4 14:30:34

Fortran编译程序时出现报错#5082、#6236

megvea.f(76): error #5082: Syntax error, found IDENTIFIER 'PARMS3' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE PARMS3.EXT   ! I/O API parameters
--------------^
megvea.f(77): error #5082: Syntax error, found IDENTIFIER 'IODECL3' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE IODECL3.EXT! I/O API function declarations
--------------^
megvea.f(78): error #5082: Syntax error, found IDENTIFIER 'FDESC3' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE FDESC3.EXT   ! I/O API file desc. data structures
--------------^
megvea.f(79): error #5082: Syntax error, found IDENTIFIER 'MEGVEA' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE MEGVEA.EXT   ! coefficients
--------------^
megvea.f(82): error #6236: A specification statement cannot appear in the executable section.
      INTEGER, EXTERNAL       ::   ENVINT
------^
megvea.f(84): error #6236: A specification statement cannot appear in the executable section.
      INTEGER, EXTERNAL       ::   ENVYN
------^
megvea.f(85): error #6236: A specification statement cannot appear in the executable section.
      LOGICAL      DSCGRID
------^
megvea.f(86): error #6236: A specification statement cannot appear in the executable section.
      EXTERNAL   DSCGRID
------^
megvea.f(90): error #6236: A specification statement cannot appear in the executable section.
      CHARACTER*16:: PROGNAME = 'MEGVEA'
------^
megvea.f(92): error #6236: A specification statement cannot appear in the executable section.
      CHARACTER*16:: LAIS46   = 'LAIS46'   ! LAI file logical name
------^
megvea.f(93): error #6236: A specification statement cannot appear in the executable section.
      CHARACTER*16:: AQFILE   = 'AQFILE'   ! Air quality index file
------^
megvea.f(94): error #6236: A specification statement cannot appear in the executmegvea.f(76): error #5082: Syntax error, found IDENTIFIER 'PARMS3' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE PARMS3.EXT   ! I/O API parameters
--------------^
megvea.f(77): error #5082: Syntax error, found IDENTIFIER 'IODECL3' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE IODECL3.EXT! I/O API function declarations
--------------^
megvea.f(78): error #5082: Syntax error, found IDENTIFIER 'FDESC3' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE FDESC3.EXT   ! I/O API file desc. data structures
--------------^
megvea.f(79): error #5082: Syntax error, found IDENTIFIER 'MEGVEA' when expecting one of: <CHAR_CON_KIND_PARAM> <CHAR_NAM_KIND_PARAM> <CHARACTER_CONSTANT>
      INCLUDE MEGVEA.EXT   ! coefficients
--------------^
megvea.f(82): error #6236: A specification statement cannot appear in the executable section.
      INTEGER, EXTERNAL       ::   ENVINT
------^
megvea.f(84): error #6236: A specification statement cannot appear in the executable section.
      INTEGER, EXTERNAL       ::   ENVYN
------^
megvea.f(85): error #6236: A specification statement cannot appear in the executable section.
      LOGICAL      DSCGRID
------^
megvea.f(86): error #6236: A specification statement cannot appear in the executable section.
      EXTERNAL   DSCGRID
------^
megvea.f(90): error #6236: A specification statement cannot appear in the executable section.
      CHARACTER*16:: PROGNAME = 'MEGVEA'
------^
megvea.f(92): error #6236: A specification statement cannot appear in the executable section.
      CHARACTER*16:: LAIS46   = 'LAIS46'   ! LAI file logical name
------^
megvea.f(93): error #6236: A specification statement cannot appear in the executable section.
      CHARACTER*16:: AQFILE   = 'AQFILE'   ! Air quality index file
------^
megvea.f(94): error #6236: A specification statement cannot appear in the execut

Transpose 发表于 2024-4-4 15:10:05

include后面跟着的是字符串,需要加引号
页: [1]
查看完整版本: Fortran编译程序时出现报错#5082、#6236