Silverfrost Forums

Welcome to our forums

Problem using 'Salford.Fortran.Character' from C#

26 Mar 2012 9:37 #9908

Thanks for your great support so far! I have been able to generate a managed LAPACK from the (slightly altered) official sources at netlib.org.

Now, I am stuck with an interfacing issue: in a FORTRAN function, a parameter of

CHARACTER*( * ) NAME

is translated to

Salford.Fortran.Character*

in the .NET assembly. This is an .NET enum type, declared in ftn95lib.dll. Could you point me to a documentation on how to use this type in lets say, C# to call any generated function using that type as parameter? Thanks again!

27 Mar 2012 10:56 #9909

In FTN95.chm look under .NET Programming and then 'Calling Fortran from other .NET languages'. Under item 2 it says 'Fortran CHARACTERs are mapped to System.String objects...'.

Also look at the section on '.NET sting type'.

28 Mar 2012 7:59 #9923

Thanks! According to the documentation, one has to use

ASSEMBLY_INTERFACE(...)

on all methods which are to be used from .NET. This will expose System.string parameter types for all CHARACTER arguments - which is nice 😃 !

Please login to reply.