home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / fortran / 4853 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  1.4 KB

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