Article View: comp.sys.mac
Article #15800MacFortran: Bug or Feature?
From: Wiley Sanders
Date: Tue, 28 Apr 1987 06:20
Date: Tue, 28 Apr 1987 06:20
19 lines
1465 bytes
1465 bytes
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
Technical Details
Message-ID:
<5092@ut-ngp.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!ut-ngp!trafficShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ut-sally!ut-ngp!traffic From: traffic@ut-ngp.UUCP (Wiley Sanders) Newsgroups: comp.sys.mac Subject: MacFortran: Bug or Feature? Message-ID: <5092@ut-ngp.UUCP> Date: Tue, 28-Apr-87 02:20:06 EDT Article-I.D.: ut-ngp.5092 Posted: Tue Apr 28 02:20:06 1987 Date-Received: Wed, 29-Apr-87 05:07:25 EDT Reply-To: traffic@ngp.UUCP (WIley Sanders) Distribution: world Organization: UTexas Computation Center, Austin, Texas Lines: 19