home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!kuhub.cc.ukans.edu!arc2d
- From: arc2d@kuhub.cc.ukans.edu
- Newsgroups: comp.lang.fortran
- Subject: IO problems in UNIX
- Message-ID: <1992Dec29.141046.45945@kuhub.cc.ukans.edu>
- Date: 29 Dec 92 14:10:45 CST
- Organization: University of Kansas Academic Computing Services
- Lines: 16
-
- I have a question concerning IO with FORTRAN on a RS/6000. I am using a code
- (PMARC) which uses NAMELISTS. One of the variables in a NAMELIST tells the
- machine that real values follow. The following statement reads the real values
- READ(15,*,ERR=700) BY,. . .etc. The error this read statement is trying to
- "trap" is the end of the real values and the beginning of the next NAMELIST.
- On a VAX this "trap" works fine and gives the error which terminates the
- reading of real values and the reading of the next NAMELIST. But on a the
- RS/6000, I get a warning and the machine merrily assigns a zero to the variable
- which isn't supposed to be there until it reaches the EOF.
- Any suggestions on work arounds? (I can always read a character string,
- check the second position for a & or $. If they are there read the NAMELIST,
- or read the real values. This means I can't start writing my reals until the
- third column. Not a severe problem, but one I would like to avoid for program
- commonality.)
- Thanks in advance
- Tom Mouch ARC2D@kuhub.cc.ukans.edu
-