|
SOLUTIONS
|
MATHEMATICA MATHLINK C 函数
MLPutInteger64()
更多信息更多信息
- 通过给定数字列表,然后使用 FromDigits 转换成数字,便可以发送任意精度的整数给 Mathematica.
- MLPutInteger64() 在错误事件中返回0,如果函数成功则返回非零值.
- 如果 MLPutInteger64() 失败,则使用 MLError() 检索错误代码.
- MLPutInteger64() 在 MathLink 标头文件 mathlink.h 中被声明.
范例范例打开所有单元关闭所有单元
基本范例 (1)基本范例 (1)
#include "mathlink.h"
/* send a 64-bit number to a link */
void f(MLINK lp)
{
mlint64 a;
#if ML64BIT_MATHLINK
/* this is a 64-bit compiler, use a native 64-bit number */
a = 0x6553600065535;
#else
/* this is a 32-bit compiler, mlint64 is a struct */
a.hi = 65536;
a.low = 65535;
#endif
if(! MLPutInteger64(lp, a))
{ /* unable to send the 64 bit integer to lp */ }
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
