自訂函數 > 結構定義 > 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}
};