The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: KenUnix <ken.unix.guy@gmail.com>
To: UNIX TUHS Group <tuhs@tuhs.org>
Subject: [TUHS] Fortran question for Unix System-5 r3
Date: Sun, 26 Mar 2023 10:00:30 -0400	[thread overview]
Message-ID: <CAJXSPs92DGWxnfrUXfYF=3RP3TP4Og5rzr40OUTqZORq_Fofdw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

Fortran question for Unix System-5 r3.

When executing fortran programs requiring input the screen will
show a blank screen. After entering input anyway the program
completes under Unix System V *r3*.

When the same program is compiled under Unix System V *r1* it
works as expected.

Sounds like on Unix System V *r3* the output buffer is not being flushed.
I tried re-compiling F77. No help.

Fortran code follows:
      PROGRAM EASTER
      INTEGER YEAR,METCYC,CENTRY,ERROR1,ERROR2,DAY
      INTEGER EPACT,LUNA
C A PROGRAM TO CALCULATE THE DATE OF EASTER
      PRINT '(A)',' INPUT THE YEAR FOR WHICH EASTER'
      PRINT '(A)',' IS TO BE CALCULATED'
      PRINT '(A)',' ENTER THE WHOLE YEAR, E.G. 1978 '
      READ '(A)',YEAR
C CALCULATING THE YEAR IN THE 19 YEAR METONIC CYCLE-METCYC
      METCYC = MOD(YEAR,19)+1
      IF(YEAR.LE.1582)THEN
        DAY = (5*YEAR)/4
        EPACT = MOD(11*METCYC-4,30)+1
      ELSE
C CALCULATING THE CENTURY-CENTRY
      CENTRY = (YEAR/100)+1
C ACCOUNTING FOR ARITHMETIC INACCURACIES
C IGNORES LEAP YEARS ETC.
        ERROR1 = (3*CENTRY/4)-12
        ERROR2 = ((8*CENTRY+5)/25)-5
C LOCATING SUNDAY
        DAY = (5*YEAR/4)-ERROR1-10
C LOCATING THE EPACT(FULL MOON)
        EPACT = MOD(11*METCYC+20+ERROR2-ERROR1,30)
        IF(EPACT.LT.0)EPACT=30+EPACT
        IF((EPACT.EQ.25.AND.METCYC.GT.11).OR.EPACT.EQ.24)THEN
          EPACT=EPACT+1
        ENDIF
      ENDIF
C FINDING THE FULL MOON
      LUNA=44-EPACT
      IF(LUNA.LT.21)THEN
        LUNA=LUNA+30
      ENDIF
C LOCATING EASTER SUNDAY
      LUNA=LUNA+7-(MOD(DAY+LUNA,7))
C LOCATING THE CORRECT MONTH
      IF(LUNA.GT.31)THEN
        LUNA = LUNA - 31
        PRINT '(A)',' FOR THE YEAR ',YEAR
        PRINT '(A)',' EASTER FALLS ON APRIL ',LUNA
      ELSE
        PRINT '(A)',' FOR THE YEAR ',YEAR
        PRINT '(A)',' EASTER FALLS ON MARCH ',LUNA
      ENDIF
      END

Any help would be appreciated,
Ken



-- 
WWL 📚

[-- Attachment #2: Type: text/html, Size: 2767 bytes --]

             reply	other threads:[~2023-03-26 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26 14:00 KenUnix [this message]
2023-03-26 15:10 ` [TUHS] " Paul Winalski

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='CAJXSPs92DGWxnfrUXfYF=3RP3TP4Og5rzr40OUTqZORq_Fofdw@mail.gmail.com' \
    --to=ken.unix.guy@gmail.com \
    --cc=tuhs@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).