I'm just trying to convert a basic helloworld.f program into C++ using fable (in preparation for a bigger program later). I'm getting an error though that says:
fable.read.Error: Missing END for PROGRAM:
at hello.f(1):
| program HelloWorld|
Which I don't understand as it compiles and runs properly otherwise. The program is just:
program HelloWorld
implicit none
write (*,*) 'Hello, world!' ! This is an inline comment
end program HelloWorld
Does anyone see the issue that fable is finding? I've never used it before so I'm just trying to see how it works. Thanks in advance for any help!
I think it can't parse end program HelloWorld
. Try changing it to end program
or just to end
.
UPDATE: Indeed, in Fortran 77 everything must end with just END:
The END statement indicates the end of the sequence of statements and comment lines of a program unit ( 3.5). If executed in a function or subroutine subprogram, it has the effect of a RETURN statement ( 15.8). If executed in a main program, it terminates the execution of the executable program.
The form of an END statement is:
END
An END statement is written only in columns 7 through 72 of an initial line. An END statement must not be continued. No other statement in a program unit may have an initial line that appears to be an END statement. The last line of every program unit must be an END statement.