Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Adriaan van Os

Mark Morgan Lloyd wrote:

Oh really? Well I'll let you travel back in time and argue with numerous 
former colleagues who've routinely found differences between their 
"fortran" (-IV, -77 or whatever) and "fast fortran" compilers which in 
those days tended to be separate programs even if supplied together.


What contributes to a discussion are precise technical facts, not hear-say talk. If these former 
colleagues are/were capable engineers, they know the technical specs and peculiarities of the 
languages and compilers they are working with. If they don't, they must find themselves another 
profession.


A. van Os

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Adriaan van Os

Mark Morgan Lloyd wrote:

I read the link before posting. You aren't going to represent 1/3 or Pi 
exactly in BCD either.


Again, that is not the point. Read the technical docs before posting.

Adriaan van Os

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Mark Morgan Lloyd

On 19/11/17 12:15, Bo Berglund wrote:

On Sun, 19 Nov 2017 11:14:50 +, Mark Morgan 
Lloyd wrote:

I think we're in broad agreement though: don't try converting backend >code unless 
you know exactly what you're doing, and Pascal (including >Lazarus/LCL etc.) can 
be valuable when implementing a C21st frontend :-)

We do have the original Fortran code and only really want to be ableto handle 
changes in operating system needs (like changing Windowsrequirements) or even 
porting to Linux.But currently we are not able to compile new DLL:s even since 
we don'thave a Fortran compiler. Can GNU Fortran be used for testing?
For example is GNU Fortran (https://gcc.gnu.org/fortran/) possible tobuild on 
Windows? I have very limited experience in compiler buildingexcept for 
FreePascal, which I have built many times...
AFICT the *sources* are available via SVN:https://gcc.gnu.org/svn.html


https://gcc.gnu.org/wiki/GFortranBinaries

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Bo Berglund
On Sun, 19 Nov 2017 11:14:50 +, Mark Morgan Lloyd
 wrote:

>I think we're in broad agreement though: don't try converting backend 
>code unless you know exactly what you're doing, and Pascal (including 
>Lazarus/LCL etc.) can be valuable when implementing a C21st frontend :-)

We do have the original Fortran code and only really want to be able
to handle changes in operating system needs (like changing Windows
requirements) or even porting to Linux.
But currently we are not able to compile new DLL:s even since we don't
have a Fortran compiler. Can GNU Fortran be used for testing?

For example is GNU Fortran (https://gcc.gnu.org/fortran/) possible to
build on Windows? I have very limited experience in compiler building
except for FreePascal, which I have built many times...

AFICT the *sources* are available via SVN:
https://gcc.gnu.org/svn.html


-- 
Bo Berglund
Developer in Sweden

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Mark Morgan Lloyd

On 19/11/17 10:15, Adriaan van Os wrote:

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.


I read the link before posting. You aren't going to represent 1/3 or Pi 
exactly in BCD either.


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.


Oh really? Well I'll let you travel back in time and argue with numerous 
former colleagues who've routinely found differences between their 
"fortran" (-IV, -77 or whatever) and "fast fortran" compilers which in 
those days tended to be separate programs even if supplied together.


I stick to my position: a "tidy" language (I'm not going to fall into 
the trap of using a word like "regular" here) generally results in a 
tidy compiler design, and that should go a long way towards avoiding 
implementation errors.


I think we're in broad agreement though: don't try converting backend 
code unless you know exactly what you're doing, and Pascal (including 
Lazarus/LCL etc.) can be valuable when implementing a C21st frontend :-)


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Adriaan van Os

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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FORTRAN from FreePascal

2017-11-19 Thread Mark Morgan Lloyd

On 19/11/17 04:00, Adriaan van Os wrote:
Mark Morgan Lloyd wrote:> I think that conventional wisdom is that if 
somebody's written numerical > analysis code you don't change it 
gratuitously, since any alterations > will change rounding errors etc. 
For some reason, that seems to apply > particularly to FORTRAN programs :-)
The reason being explained here 
 


That obviously applies to all languages, I've never come across 
something which can represent 1/3 or pi exactly. 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.


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).


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal