问题
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