|
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 »
