From mboxrd@z Thu Jan 1 00:00:00 1970 From: clemc at ccc.com (Clem Cole) Date: Thu, 5 Dec 2019 14:03:09 -0500 Subject: [COFF] Happy birthday, John Backus! In-Reply-To: References: Message-ID: 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' ;-) On Thu, Dec 5, 2019 at 1:44 PM Clem Cole wrote: > Actually, I never saw this version before today. Thanks!!! > Clem > > On Thu, Dec 5, 2019 at 12:11 PM Tom Ivar Helbekkmo via COFF < > coff at minnie.tuhs.org> wrote: > >> Clem Cole writes: >> >> > C This FORTRAN program may be compiled and run on a Norsk Data >> > C computer running SINTRAN and the FTN compiler. [...] >> >> ...and just to uphold the pride of our old friends at Norsk Data, I'd >> like to point out that the original version of that program looks even >> nicer. It compiles properly using FTN (which is the older FORTRAN 77 >> compiler for the SINTRAN operating system), in this form (which should >> explain the quip in the comment about a "block structured" language): >> >> PROGRAM >> ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA >> AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER >> R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER* >> *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX >> XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL >> LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO >> ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA >> A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L >> LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I >> IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE >> ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF); >> ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX >> XTERNAL;WRITE(IF,'(''$ '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I >> IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN= >> =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO;END >> >> Clem had to break some lines to placate his more modern compiler. :) >> >> -tih >> -- >> Most people who graduate with CS degrees don't understand the significance >> of Lisp. Lisp is the most important idea in computer science. --Alan Kay >> _______________________________________________ >> COFF mailing list >> COFF at minnie.tuhs.org >> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: