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

fortcom Error

tonylas
Beginner
465 Views
Dear all,
i have installed the 32bit Fortran compiler on my Redhat 9.0. After following the installation instructions, i tried to compile a simple hello world 'hello.f'code as follows:
--------------------- code -------------------
program hello
print *, 'Hello World'
end program
-----------------------------------------------
Then i excecute the instruction:
>> ifort hello.f
And i got the following error message:
fortcom: Error: Illegal character in statement label field

fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: Illegal character in statement label field
fortcom: Error: First statement in file must not be continued
........... and many more fortcom errors
Can someone pls give me some tips on how to solve this compilation error?
Thanks
Rgds
Tony
0 Kudos
2 Replies
TimP
Honored Contributor III
465 Views
ifort defaults to fixed format, when the file name suffix is .f or .for. Use either an option such as -FR to set free format, or the .f90 suffix.
0 Kudos
tonylas
Beginner
465 Views
Tim,
Thanks a million for the help. It compile perfectly now.
:smileyvery-happy:
Cheers
Tony
0 Kudos
Reply