Does the statement:
'Fortran data that appears in a MODULE or COMMON block is also defined as static data. This means for example that an executable and a library cannot share this kind of data. This is analogous to the situation on a Win32 platform where (by default) a Fortran executable cannot share this kind of data with a DLL.'
which is located in the help:
ms-help://MS.VSCC.v80/MS.VSIPCC.v80/Silverfrost.FTN95Help/FTN95Help/HTML/NETPROG/FortranInAnOOEnv.htm
mean that a Fortran variable in a Fortran Module is not directly accessible from within Visual Basic? By directly, I mean that I couldn't have something like the following:
Fortran Code--------------------- MODULE MOD1 real :: Real1Save END MODULE MOD1 ! Subroutine sub1_fort(real1) USE MOD1 ASSEMBLY_INTERFACE(NAME='Sub1') real, intent (inout) :: real1 Real1Save = real1 real1 = real1 + 10. RETURN END SUBROUTINE sub1_fort
Visual Basic Code-----------------
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim real1 As Single
real1 = 1.5F
Call fortran.Sub1(real1)
[color=red:311d9f43bf]** real1 = fortran.MOD1.Real1Save**[/color:311d9f43bf]
End Sub
End Class
Note: The CONTAINING_CLASS for the Fortran project is 'fortran'.
The red code above does not compile, but that is what I would like to do. I have tried making the Real1Save variable a VB object with something like:
OBJECT ('System.Single') :: Real1Save
but that didn't seem to work. If there is a direct (i.e., other that passing the variable as an argument) way to do the above, how would that be done?