brinv.cs

来自「将一些标准数值与非数值算法集中封装在几个DLL中,需要用时可在VB/Delphi」· CS 代码 · 共 22 行

CS
22
字号
using System;
using System.Runtime.InteropServices;
public class RefComm//_brinv@8 
  { 
  [DllImport("MATHLIB52.DLL", 
      EntryPoint="_brinv@8", 
      CharSet=CharSet.Auto,
          CallingConvention=CallingConvention.StdCall)]
          public static extern int brinv(double[] a,int n);
      //public static extern int brinv(ref double a,int n); 
public static void Main()
{double [] a=new double[9];
Console.WriteLine("输入3*3矩阵中的9个数:");
for(int i=0;i<a.Length;i++)
a[i]= Convert.ToDouble(Console.ReadLine());
int ret=brinv(a,3);
if(ret!=0){
foreach(double j in a)
Console.WriteLine(j.ToString()+"\t");
}
}
} 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?