[comp.sys.mac] MacFortran: Bug or Feature?

traffic@ut-ngp.UUCP (Wiley Sanders) (04/28/87)

There was something on the net a few days ago about a bug in the
DATA statement to the effect that, if a is real,

      DATA (a(i),i=1,5) / 200.3, 345.6, 378.5, 500, 456.6/
      
will return a zero in a(4) because the decimal point is missing. The bug
was said to be 'deep within the compiler' and not likely to be fixed in
subsequent releases.

I have encountered a problem similar to this in reading character files.
Reading the fields '345.67', or '3456.78' in F7.2 format works fine,
until a field missing a decimal point is encountered. Then, reading a
field like '2345' will result in 23.45 instead of 2345.00 being read
into the real variable. I am not sure whether this is a bug or not, as
the F77 spec is rather vague about what really should happen. But it's
enough that I'm giving up converting characters to reals with character
files; I wrote a subroutine to parse the string w.r.t.the decimal point
instead.
-w