Hi,
I apologize for asking this question because it is similar to several other questions in both the General and Support forums, however, I have read those discussions several times and find I am still baffled regarding how to do this. The problem is probably that I'm an engineer and only have a vague understanding of what is going on, so please keep things simple - thanks.
Anyway, I wrote a long program in vb6 and find it is very slow so I decided to convert it to Fortran. However, I can't get even the most basic program to work - I am getting an overflow error from vb
OS - Vista 64 Business (unfortunately) FTN95 V5.40
vb6 code: Private Declare Sub AIRFOIL_CALC Lib 'Z:\...\Release\Win32\AIRFOIL_CALC.dll' (x, y) Private Sub Call_FTN95() Dim x(1 To 2) As Long Dim y(1 To 2) As Long x(1) = 1 x(2) = 2 Call AIRFOIL_CALC(x, y) End Sub
FTN95 code:
F_STDCALL Subroutine AIRFOIL_CALC (x,y)
Implicit none
Integer i
Real x(1:2), y(1:2)
Do i = 1, 2
y(i) = x(i) + 1
Enddo
Return
End Subroutine
Compiler options: Debugging, optimization, numerical, language, source & diagnostics have nothing checked Under Miscellaneous I have the following: Output filename: Release\Win32\AIRFOIL_CALC.dll Output filetype: DLL Preprocess source files is checked
Linker options: Export all is checked
I have also tried this with x & y as simple variables rather than arrays and I get the same result
Thanks for your help, Kent