Tom,
Thanks again. Now, I'm going to hazard a guess as to why the version in the wild (which I had posted) had removed an F4 extension from your updated version. The END statements were intermixed with other text. The original Norsk Data compiler clearly did not care.
I just tried with ifort (201 version) and I get:
% ifort xxx.f
xxx.f(7): error #5141: END statement must be only statement on line
LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
-------------------------------------------------------^
xxx.f(9): error #5141: END statement must be only statement on line
A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
-----------------------------------------^
compilation aborted for xxx.f (code 1)
% diff eklund.f xxx.f
1,8d0
< C This FORTRAN program may be compiled and run on a Norsk Data
< C computer running SINTRAN and the FTN compiler. It uses only
< C FORTRAN reserved words, and contains just one numerical
< C constant, in a character string (a format specifier). When
< C you run it, it prints a well known mathematical construct...
< C
< C Even FORTRAN is a block structured programming language:
< C
15,17c7
< LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
< END
< SUBROUTINEFUNCTIO
---
> LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
19,21c9
< A,CALL,ASSIGN,CHARACTER);RETURN
< END
< SUBROUTINESUBROUTINE(IMPLICIT,L
---
> A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
28,29c16
< =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO
< END
---
> =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO;END
I just checked with Dave (and I'd also ask Dr. Fortran, Stan Witlock; but we lost him last year sadly). Dave's comment was that even in the old F4
standard (which he has of course), PROGRAM, END and STOP cards all need to be on separate cards (lines) and can not be intermixed with continuation. I suspect when this was sent out to wherever I picked it up a few years ago, the code had been changed to be 'pure F4' ;-)