pgf95 compilation aborted

Hi,
I am a newbie of Fortran.
I read the PGI User’s Guide (pgi62ug.pdf) and run the sample in this guid

Page. 20:

print *, "hello"
end

and I got some errors:

C:\Program Files\PGI\win32\6.2-3\bin>pgf95 hello.f
PGF90-S-0018-Illegal label field  (hello.f: 1)
PGF90-S-0034-Syntax error at or near * (hello.f: 1)
PGF90-S-0018-Illegal label field  (hello.f: 2)
PGF90-S-0022-Unexpected end of file - missing END statement (hello.f: 2)
  0 inform,   0 warnings,   4 severes, 0 fatal for MAIN

I run some sample in my textbook, I got some error too.

Is it need some args to run it?

Hi Hamlet,

For fixed form formated files (those ending with “.f”) you need to add six spaces before each line. This restriction was lifted with Fortran 90’s free form (those files ending in “.f90”). So your solutions are to add the 6 spaces, rename your file to hello.f90, or add the flag “-Mfree” which tells the compiler you’re using the free format.

Hope this helps,
Mat

Thanks, mkcolg.
I add -Mfree and it work fine.