Fortran Coder

标题: 语法问题 procedure :: readvar_{TYPE} [打印本页]

作者: fanxl    时间: 2020-8-27 11:12
标题: 语法问题 procedure :: readvar_{TYPE}

public :: interp_2dvar_type

  type :: interp_2dvar_type
     private
     character(len=:), allocatable :: varname  ! variable name
     type(var_desc_t) :: vardesc        ! variable descriptor on file
     integer :: varid                   ! variable ID on file
     type(file_desc_t), pointer :: ncid ! pointer to netcdf ID corresponding to this variable
     logical :: file_is_dest            ! true if this is on the dest file, false if on the source file
     character(len=16) :: vec_dimname   ! dimension name of vector dimension (e.g., 'col')
     character(len=16) :: lev_dimname   ! dimension name of level dimension
     integer :: vec_beg                 ! beginning index of vector dimension
     integer :: vec_end                 ! ending index of vector dimension
     integer :: nlev                    ! size of level dimension
     logical :: switchdim               ! true if dimensions are 'switched' for this variable
   contains
     ! Public routines
     generic :: readvar => readvar_int, readvar_double
     !TYPE int,double
    procedure :: readvar_{TYPE}

     generic :: writevar => writevar_int, writevar_double
     !TYPE int,double
     procedure :: writevar_{TYPE}

     generic :: readlevel => readlevel_int, readlevel_double  ! read one level
     !TYPE int,double
     procedure :: readlevel_{TYPE}



err:

/root/clm5.0/src/init_interp/initInterp2dvar.F90:43:26:


      procedure :: readvar_{TYPE}
                          1
错误: (1)处 PROCEDURE 语句语法错误
/root/clm5.0/src/init_interp/initInterp2dvar.F90:47:27:

      procedure :: writevar_{TYPE}
                           1
错误: (1)处 PROCEDURE 语句语法错误
/root/clm5.0/src/init_interp/initInterp2dvar.F90:51:28:

      procedure :: readlevel_{TYPE}
                            1
错误: (1)处 PROCEDURE 语句语法错误

initInterp2dvar.F90

14.12 KB, 下载次数: 2

源代码

lnd.bldlog.200827-093107.txt

15.24 KB, 下载次数: 1

报错信息


作者: li913    时间: 2020-8-27 15:55
花括号这不是标准语法,可能是某种预处理,或者单纯是用于被替换的。




欢迎光临 Fortran Coder (http://bbs.fcode.cn/) Powered by Discuz! X3.2