MLPutReal64 (C 関数)

MLPutReal64WSPutReal64に置き換えられた.

int MLPutReal64(MLINK link,double x)

倍精度浮動小数点数xlink で指定されたMathLink接続に置く.

詳細

  • MLPutReal64()はエラーがあると0を返し,それ以外の場合は0以外の値を返す.
  • MLError()を使うと,MLPutReal64()が不成功の場合にエラーコードを引き出すことができる.
  • MLPutReal64()は,MathLinkヘッダファイルmathlink.hの中で宣言される.

例題

  (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 */ }
}