|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLPutReal64()
int MLPutReal64(MLINK link, double x)
倍精度浮動小数点数x をlink で指定されたMathLink 接続に置く.
詳細詳細
- MLPutReal64()はエラーがあると0を返し,それ以外の場合は0以外の値を返す.
- MLError()を使うと,MLPutReal64()が不成功の場合にエラーコードを引き出すことができる.
- MLPutReal64()はMathLink ヘッダファイルmathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (1)
#include "mathlink.h"
/* put the expression Sqrt[2.7] to a link */
void f(MLINK lp)
{
if(! MLPutFunction(lp, "Sqrt", 1))
{ /* unable to put Sqrt[] to lp */ }
if(! MLPutReal64(lp, 2.7))
{ /* unable to put 2.7 to lp */ }
if(! MLEndPacket(lp))
{ /* unable to put the end-of-packet sequence to lp */ }
if(! MLFlush(lp))
{ /* unable to flush any output buffered in lp */ }
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
