我正在尝试将 C# dll-Call 移植到 F#。
C# 调用是:
[DllImport("swedll32.dll", CharSet = CharSet.Ansi, EntryPoint = "swe_revjul")]
private extern static double ext_swe_revjul(double tjd, int gregflag, ref int year, ref int month, ref int day, ref double hour);
我已经尝试以六种方式(至少!)在 F# 中编写此代码,但都无济于事。其中:
[<DllImport("swedll32.dll", CharSet = CharSet.Ansi, EntryPoint = "swe_revjul")>]
extern double ext_swe_revjul (double tjd ) (gregflag:int) (year: int byref) (month: int byref) (day: int byref) (hour: double byref);
或者:
let ext_swe_revjul double (tjd:double) (gregflag:int) (year: int byref) (month: int byref) (day: int byref) (hour: double byref )
我尝试用限定符或“a:byref”编写byref - 有人可以帮助我吗?非常感谢您!
暂时沮丧的科学家,只想得到他的公式:-)