gfortran error : Unexpected element '<' in format string

不打扰是莪最后的温柔 提交于 2021-02-04 21:38:54

问题


I suffer the pain to compile the old fortran source code using gfortran. I did not have many experience to do this, so please help me to correct the source code based on the error message.

disturbance.f:1416.31:

1505 format ( I7, E12.3, < npftu>E10.3 )
Error: Unexpected element '<' in format string at (1)

please note that there is no space between npftu and < >.

Thanks a lot.


回答1:


Variable FORMAT expressions are non-standard and are not supported by gfortran (link to the documentation).

I know your pain - I've also struggled with this problem many times before until I migrated completely to another compilers collection...




回答2:


Thanks. The easier way for me is just to know the columns for npftu. In my case, I use 10 here, so the new code would like: 1505 format ( I7, E12.3, 10E10.3 )



来源:https://stackoverflow.com/questions/10509734/gfortran-error-unexpected-element-in-format-string

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!