home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- 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
- From: haedener@iacrs1.unibe.ch (Konrad Haedener)
- Subject: Re: FORTRAN on UNIX input problem
- Message-ID: <1992Dec30.091639.11956@aragorn.unibe.ch>
- Sender: haedener@iacrs1 (Konrad Haedener)
- Reply-To: haedener@iacrs1.unibe.ch
- Organization: University of Berne
- References: <1992Dec29.134324.45943@kuhub.cc.ukans.edu>
- Date: Wed, 30 Dec 1992 09:16:39 GMT
- Lines: 29
-
- In article <1992Dec29.134324.45943@kuhub.cc.ukans.edu>, arc2d@kuhub.cc.ukans.edu writes:
- |> I have a question concerning FORTRAN on a RS/6000. The code I'm using (PMARC)
- |> uses NAMELIST inputs with real values interspersed. A variable in one NAME-
- |> LIST tells the code that a series of real values is to be read. An example of
- |> the read statement follows:
- |> READ(15,*,ERR=700) BY,. . .etc.
- |> The error this read statement is looking for is the & or $ that signals the
- |> next NAMELIST (and thus the end of the real values). The problem is: UNIX is
- |> to "kind"--it gives a warning when it reads the & or $ instead of an error.
- |> Therefore, it never goes to 700 when the next NAMELIST is encountered.
- |> Any compiler "switches" or other tricks in UNIX that are available? The
- |> error trapping works fine on a VAX, I'm want to find a way to improve the
- |> portability of the code. (I can always read a character string. See if & or $
- |> is in the second position. Then BACKSPACE and read the real value or
- |> NAMELIST.)
- |> Thanks in advance
- |> Tom Mouch ARC2D@kuhub.cc.ukans.edu
-
- If the environment variable `cnverr' is set and exported to "yes" or "YES", and
- either IOSTAT or ERR is specified in the I/O statement, conversion errors will
- cause the IOSTAT variable to be set, the ERR label to be branched to, and
- error messages to be suppressed.
-
- That's documented and the text above taken almost literally from InfoExplorer.
- --
- Konrad Haedener Phone: +41 31 65 42 25
- Institute for Physical Chemistry FAX: +41 31 65 39 94
- University of Berne
- Switzerland haedener@iacrs1.unibe.ch
-