[fpc-pascal] FORTRAN from FreePascal

Adriaan van Os fpc at microbizz.nl
Sun Nov 19 11:06:03 CET 2017


Mark Morgan Lloyd wrote:

> That obviously applies to all languages, I've never come across 
> something which can represent 1/3 or pi exactly.

If you do read what is written in the link - that is not the issue. The issue is how to interpret 
floating-point constants and how to convert single-precision floating-point to decimal. In BCD, 
that conversion is exact.

> But FORTRAN- or rather 
> the way that people use it- has always seemed peculiarly sensitive, the 
> classic problem being that recompiling with the optimising variant of 
> the compiler produces significantly different results.

This is nonsense too. The issue is whether to use IEEE-754 math or not. And there are (or should 
be) compiler switches for that purpose. Not just in Fortran.

> Elsewhere I came across discussion of (I think it was) a DEC FORTRAN 
> compiler which produced the wrong results in a block of code only if it 
> followed a comment. There's always been something grubby about FORTRAN 
> compilers, and by now I find myself wondering whether people should even 
> be attempting to design languages which don't compile easily (i.e. using 
> recursive descent or whatever).

People who don't understand Pascal, find it grubby too. Of course, languages must be well designed 
and compilers shouldn't contain errors producing the wrong code. But that is a non-statement.

I really don't think Fortran is a well-designed language. But criticism must be precise and 
factual, not hear-say emotional.

Regards,

Adriaan van Os



More information about the fpc-pascal mailing list