Kuo-Hsien Chang
Kuo-Hsien Chang

Reputation: 935

gfortran error : Unexpected element '<' in format string

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 < >.

Upvotes: 0

Views: 3517

Answers (2)

Kuo-Hsien Chang
Kuo-Hsien Chang

Reputation: 935

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 )

Upvotes: 1

Hristo Iliev
Hristo Iliev

Reputation: 74375

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...

Upvotes: 4

Related Questions