Skip to main content

1.11) Compilation


When you write Fortran code in a file it is not ready to run. First you have to convert the Fortran instructions (that we understand) into instructions that the computer understands. This is done by compiling. You tell the computer what code you have written and it produces the program that can run. The runnable program is by default called a.out.

So to compile your fortran 77 code all you need to do is type f77 ex.f (your fortran code is saved in the file ex.f). Please view the video to see both examples 1 and 2 being compiled in Fortran 95 and 77, respectively.

This video explains how you compile your program with Fortran 95 and 77.