|
SOLUTIONS
|
MATHEMATICA MATHLINK C 函数
MLPutMessageWithArg()
int MLPutMessageWithArg(MLINK link, int msg, int arg)
把消息 msg 及其自变量 arg 发送给链接对象 link.
更多信息更多信息
- MathLink 消息提供带外消息发送和接收,它不依赖于数据的正常传递.
- MLPutMessageWithArg() 在错误事件中返回0,如果函数成功则返回非零值.
- 如果 MLPutMessageWithArg() 失败,则使用 MLError() 检索错误代码.
- MLPutMessageWithArg() 在 MathLink 标头文件 mathlink.h 中被声明.
范例范例打开所有单元关闭所有单元
基本范例 (1)基本范例 (1)
#include "mathlink.h"
/* define some custom messages and arguments */
#define AppMenuMessage MLFirstUserMessage + 1
#define AppMenuOption1 1
#define AppMenuOption2 2
/* send an AppMenuMessage to a link */
void f(MLINK lp)
{
if(! MLPutMessageWithArg(lp, AppMenuMessage, AppMenuOption2))
{ /* unable to send the message to lp */ }
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
