gfortran does not allow character arrays with varying component lengths

前端 未结 2 765
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-03 15:42

See the example below

 program test

 character(10),dimension(5):: models = (/\"feddes.swp\", \"jarvis89.swp\", \"jarvis10.swp\" ,   \"pem.swp\", \"van.swp\"         


        
2条回答
  •  攒了一身酷
    2020-12-03 16:23

    The original code is accepted by ifort but it is not standard fortran, hence the error from gfortran. If you supply the option -std to ifort it will print warnings when the compiler allows extensions such as this.

提交回复
热议问题