Topic: Really elementary Fortran stuff

I haven't done any Fortran programming for nearly 30 years apart from a brief flurry about 4 years ago when I found a free Fortran 90 compiler online. It doesn't work with a 64-bit processor so SimplyFortran seems like the answer to my needs.

I'm attempting to build a program that compiled and ran satisfactorily in Fortran 90 but it's giving me the following errors. For this first one, I can't even tell which line of code it's referring to:
Compiling ..\..\..\..\Documents\Simply Fortran\Process.for
..\..\..\..\Documents\Simply Fortran\Process.for:2:72: Error: Invalid character in name at (1)

For the second, all these arrays were dimensioned without an error message:
read (77,*,end=1000) utme(i),utmn(i),var(i)
                                          1
Error: Syntax error in READ statement at (1)
..\..\..\..\Documents\Simply Fortran\Process.for:47:72: Error: Unexpected STATEMENT FUNCTION statement at (1)
..\..\..\..\Documents\Simply Fortran\Process.for:70:27:

Does anyone know what might be wrong? Thanks
Failing that, can anyone recommend a primer or online course so I don't have to ask so many of these elementary questions?

Re: Really elementary Fortran stuff

I think your problem stems from your using the filename Process.for.  The .for extension is reserved for Fortran source code files that are using fixed-format Fortran syntax, meaning code must end before the 72nd column.  Your first error is indicating some sort of problem in Process.for on line 2, column 72 (hence the "2:72" in the error message), which is why I suspect that is the issue.

The subsequent read error is probably caused by something not being declared on account of the earlier errors.  You have another column-72-related error further down.

Simply Fortran's compiler predicts the expected formatting based on file extension.  .for and .f indicate fixed-format files, while .f90, .f95, .f03, and .f08 indicate newer styled free-format Fortran.

If you rename your file Process.f90, your errors might go away.  It would be useful if you continue to see similar errors if you could post some code as well (if possible, of course) so we might decipher the errors.

Let us know if the renaming suggestion works!

Jeff Armstrong
Approximatrix, LLC

Re: Really elementary Fortran stuff

It worked! I sent a subsequent question which I now can't see, but I have worked out the answer to that one for myself.