- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim,
Thanks a million for the help. It compile perfectly now.
:smileyvery-happy:
Cheers
Tony

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page