0

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

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

2 Comments

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 )
Knowing the columns of what you need is just a particular case. Being able to use a variable string format is much more flexible, even if you fix that variable to 10 ;)
1

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 )

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.