| Refresh | Home EGTry.com

first fortran program


hello.f

c2345 7890 comment       
      program hello !entry point

      write(*,*) 'Hello World' 
      stop
      end


compile with gcc's gfortran

 gfortran hello.f

execute the program

 a.out

Output

 Hello World


fixed format

column example meaning
1 blank
1 c or * comment
1-5 " 12345" label
6 blank
6 any char continuation
7-72 code
73-80 sequence number not used