Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29264 Discussions

Fortran DLLs for Object Pascal (Delphi)

michael_green
Beginner
530 Views
Hi All,

I have to write a series of Fortran DLLs for a third party package written in Object Pascal. My problem is how to set up the calling convention - such documentation as I have is inadequate. According to my understanding, the following should work ...

real*4 function banet(age)

!DEC$ ATTRIBUTES DLLEXPORT,STDCALL ::banet

!DEC$ ATTRIBUTES VALUE :: age

implicit none

real*4 age

banet = 45.82*(1-exp(-0.0293*age))**0.6311

return

end function banet

... but it doesn't. Does anyone have any insights or clues about this?

With many thanks in advance,
Mike

0 Kudos
1 Reply
Steven_L_Intel1
Employee
530 Views
Are you sure about the VALUE attribute? Actually, you'll get VALUE by default with STDCALL - you might want to try REFERENCE. What doesn't work? What does the Delphi declaration look like?
0 Kudos
Reply