home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / aix / 12931 < prev    next >
Encoding:
Text File  |  1992-12-30  |  2.2 KB  |  42 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!ames!elroy.jpl.nasa.gov!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!aragorn.unibe.ch!iacrs1!haedener
  3. From: haedener@iacrs1.unibe.ch (Konrad Haedener)
  4. Subject: Re: FORTRAN on UNIX input problem
  5. Message-ID: <1992Dec30.091639.11956@aragorn.unibe.ch>
  6. Sender: haedener@iacrs1 (Konrad Haedener)
  7. Reply-To: haedener@iacrs1.unibe.ch
  8. Organization: University of Berne
  9. References:  <1992Dec29.134324.45943@kuhub.cc.ukans.edu>
  10. Date: Wed, 30 Dec 1992 09:16:39 GMT
  11. Lines: 29
  12.  
  13. In article <1992Dec29.134324.45943@kuhub.cc.ukans.edu>, arc2d@kuhub.cc.ukans.edu writes:
  14. |> I have a question concerning FORTRAN on a RS/6000.  The code I'm using (PMARC)
  15. |> uses NAMELIST inputs with real values interspersed.  A variable in one NAME-
  16. |> LIST tells the code that a series of real values is to be read.  An example of
  17. |> the read statement follows:
  18. |> READ(15,*,ERR=700) BY,. . .etc.
  19. |> The error this read statement is looking for is the & or $ that signals the
  20. |> next NAMELIST (and thus the end of the real values).  The problem is:  UNIX is
  21. |> to "kind"--it gives a warning when it reads the & or $ instead of an error.
  22. |> Therefore, it never goes to 700 when the next NAMELIST is encountered.
  23. |>   Any compiler "switches" or other tricks in UNIX that are available?  The
  24. |> error trapping works fine on a VAX, I'm want to find a way to improve the 
  25. |> portability of the code.  (I can always read a character string.  See if & or $
  26. |> is in the second position.  Then BACKSPACE and read the real value or
  27. |> NAMELIST.)
  28. |>   Thanks in advance
  29. |>   Tom Mouch  ARC2D@kuhub.cc.ukans.edu    
  30.  
  31. If the environment variable `cnverr' is set and exported to "yes" or "YES", and
  32. either IOSTAT or ERR is specified in the I/O statement, conversion errors will
  33. cause the IOSTAT  variable to be set, the ERR label to be branched to, and 
  34. error messages to be suppressed. 
  35.  
  36. That's documented and the text above taken almost literally from InfoExplorer.
  37. -- 
  38. Konrad Haedener                             Phone: +41 31 65 42 25
  39. Institute for Physical Chemistry            FAX:   +41 31 65 39 94
  40. University of Berne
  41. Switzerland                                 haedener@iacrs1.unibe.ch
  42.