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