|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLTransferToEndOfLoopbackLink()
詳細詳細
- s とd は異なっていなければならない.
- s はループバックリンクでなければならないが,d はループバックリンクでも普通のリンクでもよい.
- MLTransferToEndOfLoopbackLink()はエラーがあると0を返し,関数が成功するとゼロ以外の値を返す.
- MLTransferToEndOfLoopbackLink()は,MathLink ヘッダファイルmathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (1)
#include "mathlink.h"
/* build up an expression on a loopback link and send that expression to a second link */
void f(MLINK lp1, MLINK lp2)
{
if(! MLPutFunction(lp1, "EvaluatePacket", 1))
{ /* unable to put the function to lp1 */ }
if(! MLPutFunction(lp1, "ToExpression", 1))
{ /* unable to put the function to lp1 */ }
if(! MLPutString(lp1, "a = Table[Random[Integer, 11],{12}];", 36))
{ /* unable to put the string to lp1 */ }
if(! MLEndPacket(lp1))
{ /* unable to send the end-of-packet indicator to lp1 */ }
if(! MLFlush(lp1))
{ /* unable to flush any outgoing data buffered in lp1 */ }
if(! MLTransferToEndOfLoopbackLink(lp2, lp1))
{ /* unable to transfer all the data from lp1 to lp2 */ }
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
