Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!ut-sally!utah-cs!BEEBE@SCIENCE From: Beebe@SCIENCE (Nelson H.F. Beebe) Newsgroups: comp.lang.fortran Subject: Re: Fortran77 internal files Message-ID: <12326727466.15.BEEBE@SCIENCE.UTAH.EDU> Date: Sat, 15-Aug-87 13:36:19 EDT Article-I.D.: SCIENCE.12326727466.15.BEEBE Posted: Sat Aug 15 13:36:19 1987 Date-Received: Sun, 16-Aug-87 11:30:31 EDT Lines: 30 In-Reply-To: <325@daisy.warwick.ac.uk> X-Us-Mail: "Center for Scientific Computation, South Physics, University of Utah, Salt Lake City, UT 84112" X-Telephone: (801) 581-5254 Regarding the following observation from T.Clark@daisy.warwick.ac.uk >> CHARACTER*8 BUFF >> BUFF = '1' >> READ(BUFF,'(F8.0)') X >> WRITE(*,*) X >> STOP >> END >> >> Unix 4.2 bsd f77 yeilds:- >> 1.00000 >> >> whilst IBM's VS FORTRAN yields:- >> 10000000.0 Sun OS 3.3 (~4.2BSD) gives 1.0, while DEC VAX VMS and TOPS-20 give the same value as IBM. The Standard is silent on the question of BLANK=ZERO or BLANK=NULL for internal files. Historically (pre-Fortran 77), BLANK=ZERO was the default, and on that basis, Unix is wrong, and DEC and IBM are right. However, if the BLANK= specifier is omitted in an OPEN statement, the default is BLANK=NULL, which would suggest that Unix is correct, and the others are wrong. However, no OPEN statement is involved for internal files, so it appears we have a definite ambiguity in ANSI X3.9-1978. A programming solution is simply to change the format to use a BN or BZ item, depending on the desired interpretation of blanks. -------