tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Fortran occasionally puts nulls in formatted output
@ 1995-07-14 15:45 Mark Bartelt
  0 siblings, 0 replies; only message in thread
From: Mark Bartelt @ 1995-07-14 15:45 UTC (permalink / raw)
  To: tru64-unix-managers

The output of the following program has a NULL character in place of one
(and only one!) of the ASCII blanks.  Specifically, two blank characters
after the 105th numeric value appear as a NULL followed by a blank.

        real*8 xx(120)
        data xx/120*0.0/
        open(30,file='bozo.snarf',status='unknown')
        write(30,100) (xx(k), k=1,120)
100     format(1p200(1x,1g10.3))
        close(30)
        end

If you do an "od -c bozo.snarf", you see the following at the locaction
where the error occurs:

[ ... ]
0002140    0   0           0   .   0   0   0   E   +   0   0           0
0002160    .   0   0   0   E   +   0   0           0   .   0   0   0   E
0002200    +   0   0  \0       0   .   0   0   0   E   +   0   0        
[ ... ]               ^^
            This should be a blank.

Fortran 3.5 under OSF/1 V3.2, by the way.  Does anyone know whether it's
been fixed in some later release of Fortran?

Mark Bartelt                                               416/978-5619
Canadian Institute for                            mark@cita.toronto.edu
Theoretical Astrophysics                          mark@cita.utoronto.ca

"Nur eine Waffel taugt!"       --       Parsifal, in an Eggo commercial

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-07-14 15:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-07-14 15:45 Fortran occasionally puts nulls in formatted output Mark Bartelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox