Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help ; FORTRAN IV

0 views
Skip to first unread message

Deep [ankar] Medhi

unread,
Jul 18, 1986, 5:07:38 PM7/18/86
to
I am trying to run a code written for IBM FORTRAN IV on
vax 780 running unix. There are a few things I don't understand.
For example, there is a line

DEFINE FILE (80,1823,U,KD)

the variable U is not mentioned anywhere else. KD is an
integer*4 variable.
Then , there are READ and WRITE statments, which appear as follows:

READ(9'KD)NTEMP(1),NTEMP(2),ICNAM

WRITE(9'KD)NTEMP(1),NTEMP(2),ICNAM

. Then other ones are

READ(8)(Z(I),I=1,N)
WRITE(8)(Z(I),I=1,N)

Is there anyone out there when can tell me how to fix this
for vax/unix ?

Thanks in advance.


Deepankar Medhi

arpa : me...@rsch.wisc.edu

UUCP : ...!siesmo!uwvax!medhi

Kurt Krueger

unread,
Jul 21, 1986, 3:16:30 PM7/21/86
to
In article <10...@rsch.wisc.edu> me...@rsch.wisc.edu (Deep [ankar] Medhi) writes:
>I am trying to run a code written for IBM FORTRAN IV on
>vax 780 running unix. There are a few things I don't understand.
>For example, there is a line
>
> DEFINE FILE (80,1823,U,KD)
>
>the variable U is not mentioned anywhere else. KD is an
>integer*4 variable.

Standard way:

OPEN(UNIT=80,FILE='name',RECL=1823,FORM='UNFORMATTED',ACCESS='DIRECT')

The KD is the 'associated' variable which keeps track of the position
of the file (i.e. last random record read/wrote+1) It isn't used in this
manner in standard f77. U means undefined record type, again, this has no
counterpart in f77 (and shouldn't matter).

>Then , there are READ and WRITE statments, which appear as follows:
>
> READ(9'KD)NTEMP(1),NTEMP(2),ICNAM

Standard way:

READ(9,REC=KD)NTEMP(1),NTEMP(2),ICNAM

Warning: The code may depend on the fact that the IBM implementation
will automatically increment KD each time a record is read/written.

Enjoy. I haven't had to deal with these things in a long time. Hope
I didn't botch any details. DEC used some of these concepts in the RT-11
Fortran IV. If you can't find an IBM manual, try for an old DEC PDP-11 manual.
>
> WRITE(8)(Z(I),I=1,N)

This is a standard unformatted read/write. It is still a part of f77.

0 new messages