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

  1. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!kuhub.cc.ukans.edu!arc2d
  2. From: arc2d@kuhub.cc.ukans.edu
  3. Newsgroups: comp.unix.aix
  4. Subject: FORTRAN on UNIX input problem
  5. Message-ID: <1992Dec29.134324.45943@kuhub.cc.ukans.edu>
  6. Date: 29 Dec 92 13:43:24 CST
  7. Organization: University of Kansas Academic Computing Services
  8. Lines: 16
  9.  
  10. I have a question concerning FORTRAN on a RS/6000.  The code I'm using (PMARC)
  11. uses NAMELIST inputs with real values interspersed.  A variable in one NAME-
  12. LIST tells the code that a series of real values is to be read.  An example of
  13. the read statement follows:
  14. READ(15,*,ERR=700) BY,. . .etc.
  15. The error this read statement is looking for is the & or $ that signals the
  16. next NAMELIST (and thus the end of the real values).  The problem is:  UNIX is
  17. to "kind"--it gives a warning when it reads the & or $ instead of an error.
  18. Therefore, it never goes to 700 when the next NAMELIST is encountered.
  19.   Any compiler "switches" or other tricks in UNIX that are available?  The
  20. error trapping works fine on a VAX, I'm want to find a way to improve the 
  21. portability of the code.  (I can always read a character string.  See if & or $
  22. is in the second position.  Then BACKSPACE and read the real value or
  23. NAMELIST.)
  24.   Thanks in advance
  25.   Tom Mouch  ARC2D@kuhub.cc.ukans.edu    
  26.