Error: Non-numeric character in statement at label (1)

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.

Leave a Comment