Article View: comp.lang.fortran
Article #4523Re: compiling FORTRAN IV on Unix f77
From: furio ercolessi
Date: Wed, 27 Jan 1993 21:17
Date: Wed, 27 Jan 1993 21:17
51 lines
2759 bytes
2759 bytes
In article <1k6e6cINNmqo@bigboote.WPI.EDU>, bugsy@yoyodyne.WPI.EDU (Christopher Sean Moran) writes:
|>Help me... I have a program called VORLAX which I need to compile.
|>It was written and compiled originally on CDC FORTRAN IV. All
|>I have access to is Unix f77. I have tried to compile it, but
|>its a no go. One problem is the first line
|>
|>PROGRAM VORLAX(INPUT,OUTPUT, etc)
|>
|>the compiler doesnt like the parenthesis after the program
|>declaration. Past that there are no other problems.
Ah, good old days! The parenthesis above were a CDC extension
providing a sort of i/o redirection. You could run the program by
something like
VORLAX,FOO,BAR.
which worked as vorlax < foo > bar would work on Unix.
But you could redirect many files with arbitrary fortran unit
numbers.
|>I do get an executable after compiling if I take the stuff
|>in the parenthesis out. But UNIX dumps my core every time
|>I run the program. Can anyone help me?
As opposed to Fortran 90 vs Fortran 77, Fortran 77 is not downward
compatible with Fortran 66 (CDC's FORTRAN IV is Fortran 66).
In particular, DO loops behave in a different way, and in Fortran 66
they are *always* executed at least once. So that
A=0.
DO 100 I=2,1
A = A + 1.
100 CONTINUE
B = B/A
would run fine with Fortran 66 but dump your core with Fortran 77.
Many compilers have an option to force the old-style behavior; look
for -onetrip or something like that.
Of course, your program may dump for other reasons. The CDC was
a 60 (sic) bits machine using a 6-bit (ugh) character set, not ASCII,
so the potential for breakdowns related to COMMONs, EQUIVALENCEs,
characters stored in reals ... etc are huge. I would suggest to check
accurately everything dealing with character manipulation. As in
Fortran 66 there was no CHARACTER type, this is kinda fun. :-)
Good luck!
furio
--
furio ercolessi <furio@uiuc.edu>* <furio@sissa.it>+
* materials research lab, uni illinois at urbana-champaign
+ intl school for advanced studies, trieste, italy
"Change nothing and continue with immaculate consistency"
[ Brian Eno, "Oblique Strategies" ]
Technical Details
Message-ID:
<C1J750.111@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!opl.com!hri.com!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessiReferences:
<1k6e6cINNmqo@bigboote.WPI.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!opl.com!hri.com!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi) Newsgroups: comp.lang.fortran Subject: Re: compiling FORTRAN IV on Unix f77 Message-ID: <C1J750.111@news.cso.uiuc.edu> Date: 27 Jan 93 21:17:22 GMT References: <1k6e6cINNmqo@bigboote.WPI.EDU> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi) Organization: MRL - UIUC Lines: 51