|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLGetArgCount()
int MLGetArgCount(MLINK link, int *n)
link 上の関数の引数個数を調べ,その結果をn に保持する.
詳細詳細
- MLGetArgCount()はMathLink ヘッダファイルmathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (1)
#include "mathlink.h"
/* check a link for a function and return the number of arguments */
int f(MLINK lp)
{
int a;
switch(MLGetType(lp))
{
case MLTKFUNC:
/* get the argument size */
if(! MLGetArgCount(lp, &a))
{ /* unable to get the number of arguments from lp */ }
return a;
default:
/* ... */
}
/* ... */
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
