Computer Old Farts Forum
 help / color / mirror / Atom feed
From: clemc at ccc.com (Clem Cole)
Subject: [COFF] Happy birthday, John Backus!
Date: Thu, 5 Dec 2019 14:03:09 -0500	[thread overview]
Message-ID: <CAC20D2P-OqcUm6+-OxB+EXwP9jPoAArp_P70TfyJO3j2QWi6tg@mail.gmail.com> (raw)
In-Reply-To: <CAC20D2PfQxXMHi_qCUhf7bNAFvLthzChftJcQ6oBvCuT_C9OnA@mail.gmail.com>

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 <clemc at ccc.com> 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 <clemc at ccc.com> 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: <http://minnie.tuhs.org/pipermail/coff/attachments/20191205/4386cb16/attachment.html>


  reply	other threads:[~2019-12-05 19:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  7:55 dave
2019-12-03 13:44 ` clemc
2019-12-03 15:57   ` toby
2019-12-03 16:05     ` lars
2019-12-04  5:41   ` wobblygong
2019-12-04 14:54     ` clemc
2019-12-04 15:08       ` clemc
2019-12-04 15:14     ` clemc
2019-12-05  6:11       ` wobblygong
2019-12-05 12:38         ` clemc
2019-12-05 17:03   ` tih
2019-12-05 18:44     ` clemc
2019-12-05 19:03       ` clemc [this message]
2019-12-05 19:50         ` tih
2019-12-05 20:56           ` clemc
2019-12-03 19:20 ` cym224

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC20D2P-OqcUm6+-OxB+EXwP9jPoAArp_P70TfyJO3j2QWi6tg@mail.gmail.com \
    --to=coff@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).