Path: utzoo!attcan!uunet!munnari.oz.au!mel.dit.csiro.au!dmp.csiro.au!sfy From: sfy@dmp.csiro.au (Shane Youl) Newsgroups: comp.lang.fortran Subject: Proper interpretation of blank control in Fortran 77 Message-ID: <1990Oct23.013848.16071@dmp.csiro.au> Date: 23 Oct 90 01:38:48 GMT Organization: CSIRO Division of Mineral Products, Melbourne, AUSTRALIA Lines: 51 Can someone provide the *CORRECT* interpretation for the BZ format specifier. The Sun Fortran manual says "BZ - if BZ precedes a specification, a non-leading blank in the input data is considered zero." The VMS Fortran manual says "The BZ descriptor causes the processor to treat all the embedded and trailing blanks it encounters within a numeric input field as zeros." In neither of the above cases is the behaviour flagged as an extension nor a modification of the standard. The following code illustrates the problem under Sun OS and Sun's f77 - sfy_68% cat bz.f character CARD*8 real A, B c 12345678 data CARD / " 1" / c read ( CARD, 1000 ) A,B write ( *, 2000 ) A,B read ( CARD, 1001 ) A,B write ( *, 2000 ) A,B stop 1000 format ( bz,f1.0,f7.0 ) 1001 format ( bz,f2.0,f6.0 ) 2000 format ( 2f8.4 ) end sfy_69% f77 bz.f bz.f: MAIN: sfy_70% a.out 0.NaN0 1.0000 0.0000 1.0000 sfy_71% Under VMS, the two output lines are identical. ADVthanksANCE -- ____ _____ ____ ____ Shane Youl / \ / / / \ / \ CSIRO Division of Mineral Products / /_____ / /_____/ / / PO Box 124 Port Melbourne 3207 / / / / \ / / AUSTRALIA \____/ _____/ / / \ \____/ Internet : sfy@dmp.CSIRO.AU Phone : +61-3-647-0211 SCIENCE ADVANCING AUSTRALIA