This is the program I compile on ubuntu 14.04 using
f95 First.f -o First
and the program is
!My first program
program fir
Rename your file from First.f
to First.f90
.
You have encountered an issue which is easily avoided. Compilers generally assume that .f
files are written in what is known as fixed source form, which has been obsolescent since Fortran 90. With the .f90
suffix your compiler should expect to encounter free source form and not complain as it has done. In fixed source form, cols 1-6 in each line are reserved for a (numeric) statement label.
Now, use your favorite Fortran resources to understand, if you care, the differences between the two source forms.