Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

Does IF 7 support variable expression in Format Statement?

tol1
Beginner
459 Views
Hello,

Intel Fortran 7 seems to be able to compile the variable expression format statement without any error, but the program fails at runtime.

m = 5
print '(f10.4)' x1,x2,x3,x4,x5

Regards,
Long
0 Kudos
2 Replies
Steven_L_Intel1
Employee
459 Views
Well, yes, Intel Fortran 7 does support variable format expressions in FORMAT statements, but you didn't write a FORMAT statement!

IF7 does not support VFEs in character literal formats, which is what you used. Use a separate FORMAT statement and it will work ok.

This works in CVF and should work in the future Intel Visual Fortran product.

Steve
0 Kudos
tol1
Beginner
459 Views
Thanks for clarification!

Regards,
Long
0 Kudos
Reply