* [TUHS] Fortran question for Unix System-5 r3
@ 2023-03-26 14:00 KenUnix
2023-03-26 15:10 ` [TUHS] " Paul Winalski
0 siblings, 1 reply; 2+ messages in thread
From: KenUnix @ 2023-03-26 14:00 UTC (permalink / raw)
To: UNIX TUHS Group
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [TUHS] Re: Fortran question for Unix System-5 r3
2023-03-26 14:00 [TUHS] Fortran question for Unix System-5 r3 KenUnix
@ 2023-03-26 15:10 ` Paul Winalski
0 siblings, 0 replies; 2+ messages in thread
From: Paul Winalski @ 2023-03-26 15:10 UTC (permalink / raw)
To: KenUnix; +Cc: UNIX TUHS Group
[already answered in COFF, but since it is Unix-related I'll answer
here as well]
On 3/26/23, KenUnix <ken.unix.guy@gmail.com> wrote:
> 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.
The bug is almost certainly in the Fortran run-time library (RTL), not
in the compiler, so rebuilding the compiler won't help.
As a compiler engineer for many years, this regression bug got me
curious as to the software development processes in place for Unix
System V. How was testing and release qualification done for f77 and
other utilities released with System V? Was an automated test system
used? Were reported and fixed bugs turned into regression tests?
Apropos this regression bug in particular, what testing of interactive
functionality was done, and how was it done? Automating interactive
testing can be cussedly difficult.
-Paul W.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-26 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 14:00 [TUHS] Fortran question for Unix System-5 r3 KenUnix
2023-03-26 15:10 ` [TUHS] " Paul Winalski
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).