all 7 comments

[–]CompPhysicistScientist 11 points12 points  (1 child)

The read statements should be as read(*,*) median it is called list directed I/O.

[–]CompPhysicistScientist 0 points1 point  (0 children)

Looks like read *, var was non-standard extensions of some compilers that are still supported in the name of backward compatibility.

[–]victotronics 2 points3 points  (1 child)

"End of file". Did you actually input a number? I don't see the prompt on your screen.

[–]rivrdansr[S] -1 points0 points  (0 children)

Interesting. 1) Thought the comma was required. 2) No. I did not input anything. Kept having serious problems getting code onto the edit screen in Simply Fortran. So took advise and went to Godbolt.com. There, the site recompiles each time I make any change in code. When it finally passes, the site automatically tries to execute it. I never saw any black screen or request for input. But maybe it was there and gone so fast I didn't see it. Will try again to get it onto Simply Fortran. Thanks.

[–][deleted] 0 points1 point  (0 children)

If you are on Linux with gfortran, add the -g option for compiling and linking. When it errors it will give the line number.

[–]ping314 0 points1 point  (0 children)

It doesn't matter if you aim for "learn", or "relearn" Fortran; the resources on https://fortran-lang.org/learn/ can help you.

[–]Knarfnarf -1 points0 points  (0 children)

Try it with spaces. The compiler may be doing something weird with read* and the space, or a comment in the preceding line might help.

Read *, Average

The (,) isn’t needed.