|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLPutData()
int MLPutData(MLINK link, const char *b, int count)
count バイトをバッファ b からlink で指定されたMathLink 接続に置く.
詳細詳細
- MLPutData() はエラーがあると 0 を返し, 関数が成功すると0以外の値を返す.
- MLError()を使うと,MLPutData()が不成功の場合にエラーコードを引き出すことができる.
- MLPutData()はMathLink ヘッダファイルmathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (1)
#include <string.h>
#include "mathlink.h"
/* send "Hello World!" to a link */
void f(MLINK lp)
{
if(! MLPutNext(lp, MLTKSTR))
{ /* unable to put type MLTKSTR to lp */ }
if(! MLPutSize(lp, strlen("Hello World!"))
{ /* unable to put the length of "Hello World!" to lp */ }
if(! MPutData(lp, "Hello World!", strlen("Hello World!")))
{ /* unable to put the data "Hello World!" to lp */ }
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
