[fpc-pascal] FORTRAN from FreePascal
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Sat Nov 18 21:14:35 CET 2017
On 18/11/17 19:45, Bo Berglund wrote:
> On Sat, 18 Nov 2017 17:06:25 +0000, Mark Morgan Lloyd<markMLl.fpc-pascal at telemetry.co.uk> wrote:
>> I find myself wondering, in part due to conversations elsewhere: can the >Lazarus IDE do anything at all sane with a FORTRAN routine called from >Pascal?
> In the D7 application written in ObjectPascal calls were made into theFORTRAN created DLL:s referencing multi-dimensional arrays of data.Fortran processes the inversion and returns modified/new array output.So as long as the interface is like this and the calling conventionsare OK it should work also from Lazarus/FPC.
Except that when you're calling into a DLL (.so on Linux etc.) I don't
think you have much chance of seeing the inside of the library code.
With a statically-linked program it should be possible.
A friend-of-a-friend has a certain amount of legacy FORTRAN, so this is
something that I really must find the time to try at some point.
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 :-)
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal
mailing list