This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Console I/O Help with g77


Hello,

I am new to g77, and am attempting to convert a program that ran under VS
Fortran on an IBM mainframe.  I have converted most of the program without
difficulty, but am having some problems related to console I/O.  I am using
g77 under Windows 2000.

The mainframe version of the program to be converted contains a number of
lines similar to the following:

      CALL CMS(IRC,'CLRTERM ')

These calls are used to clear the screen on IBM 3270 style terminals prior
to subsequent output.  Is there an equivalent g77 command that be used to
clear the contents of the console (e.g. issue a form feed?)?


The mainframe version of the program also contains numerous chunks of code
similar to the following:

 1315 REWIND 5
 1411 WRITE(7,1412) PCS
 1412 FORMAT(' ','Surface casing pressure (psi): ',F6.0)
      READ(5,*,ERR=1411,END=1415) PCS

g77 doesn't seem to allow a REWIND for unit 5 (console input).  Without the
REWIND there doesn't seem to be any way to detect and handle null input
(which is very important in this program to accept numerous default values).
Is there some way to do this that I am missing?


Finally, a portion of this program is intended to write output to a standard
text (ASCII) file that can be viewed or printed.  The mainframe version of
the program includes traditional FORTRAN formatting characters for column 1
of the output file (e.g. '0', '1', etc.).  g77 doesn't seem to translate
these formatting commands into the appropriate ASCII characters for line
feed, form feed, etc. in the output file.  Is there some way to get g77 to
automatically perform this translation?  If not, what is the standard way of
writing form feeds and such for an ASCII output file under G77?

Thanks in advance for any help.

s/KAM




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]