Hi. Somebody gave me some code that I need for some of my research. I tried to compile the code with g77 but was unsuccessful. Maybe you know what compiler it should use if not g77. The code was meant to run on windows NT. It was actually written for the WATCOM fortran compiler but I don't know where to get the old compilers of WATCOM. To be specific, the command in the console was "wfl386 mystest.for" to compile such a file. Here is the code for one of the many files I have:
PROGRAM UNFORMAT_COAST
c reads formatted file: coast.fmt
c writes unformatted file: coast$d.dat
parameter (mxp=10650)
STRUCTURE /segment/
integer*2 ndx
integer*2 nrp
integer*2 nrc
integer*2 lat(mxp)
integer*2 lon(mxp)
END STRUCTURE
record /segment/line
logical eof
OPEN (15,file='coast$d.dat',status='unknown',form='unformatted')
OPEN (16,file='coast.fmt', status='old')
eof=.false.
do while (.not.eof)
read (16,'(3i5/(10i6))')
& line.ndx,
& line.nrp,
& line.nrc,
& (line.lat(n),
& line.lon(n),n=1,line.nrp)
write (15)
& line.ndx,
& line.nrp,
& line.nrc,
& (line.lat(n),
& line.lon(n),n=1,line.nrp)
if (line.ndx .eq. 9000) go to 19
end do
19 CLOSE (15)
CLOSE (16)
STOP
END ! UNFORMAT_COAST
Thank you
Etienne Koen