!******************************************************************************* ! specs for external routines in this file IMPIOCPI %routinespec openinput(%integer stream,%string(100) filename) %integerfnspec instream %string(100)%fnspec infilename(%integer stream) %routinespec closeinput(%integer stream) %routinespec openoutput(%integer stream,%string(100) filename) %integerfnspec outstream %string(100)%fnspec outfilename(%integer stream) %routinespec closeoutput(%integer stream) %routinespec stop %shortintegerfnspec iocp(%shortinteger ep,n,x) !******************************************************************************* ! specs for Pascal routines in IMPIOCP %externalroutinespec ioinit %externalroutinespec openin(%shortinteger s,%string(100) filename) %externalshortintegerfnspec instrm %externalroutinespec infile(%shortinteger s,%integer fileref) %externalroutinespec closein(%shortinteger s) %externalroutinespec openout(%shortinteger s,%string(100) filename) %externalshortintegerfnspec outstrm %externalroutinespec outfile(%shortinteger s,%integer fileref) %externalroutinespec closeout(%shortinteger s) %externalroutinespec closeall %externalshortintegerfnspec iocpp(%shortinteger ep,n,x) !******************************************************************************* ! spec for STOP in F77INIT %externalroutinespec f77stop !****************************************************************************** %owninteger init=0 {not initialised yet} %externalroutine openinput(%integer stream,%string(100) filename) %if init=0 %then ioinit %and init=1 openin(stream,filename) %end %externalintegerfn instream %if init=0 %then ioinit %and init=1 %result=instrm %end %externalstring(100)%fn infilename(%integer stream) %string(100) filename %if init=0 %then ioinit %and init=1 infile(stream,addr(filename)) %result=filename %end %externalroutine closeinput(%integer stream) %if init=0 %then ioinit %and init=1 closein(stream) %end %externalroutine openoutput(%integer stream,%string(100) filename) %if init=0 %then ioinit %and init=1 openout(stream,filename) %end %externalintegerfn outstream %if init=0 %then ioinit %and init=1 %result=outstrm %end %externalstring(100)%fn outfilename(%integer stream) %string(100) filename %if init=0 %then ioinit %and init=1 outfile(stream,addr(filename)) %result=filename %end %externalroutine closeoutput(%integer stream) %if init=0 %then ioinit %and init=1 closeout(stream) %end %externalroutine stop %if init=0 %then ioinit %and init=1 {needed to initialise ..file[..] } closeall {close all streams left open} f77stop {to do the exit(run)} %end %externalshortintegerfn iocp(%shortinteger ep,n,x) %if init=0 %then ioinit %and init=1 %result=iocpp(ep,n,x) %end %endoffile