自定义函数 > 结构定义 > FUNCTIONINFO 结构
FUNCTIONINFO 结构
使用 FUNCTIONINFO 结构向 PTC Mathcad 注册自定义函数。该结构包含关于以下几方面的信息:PTC Mathcad 识别函数所依据的名称、函数参数说明、函数自变量、函数返回值以及指向执行函数的代码的指针。
示例
FUNCTIONINFO Multiply =
{
// The function name, as it should appear in Mathcad
"Multiply",
// The function arguments "a,M",
// A brief description of the function
"Returns the product of the scalar a and the matrix M",
// The call to your code
(LPCFUNCTION)MyCFunctionname;
// The type of the result
COMPLEX_ARRAY,
// The number and type of the arguments
2,
{COMPLEX_SCALAR, COMPLEX_ARRAY}
};
这对您有帮助吗?