MLGetReal128 (C 関数)

MLGetReal128WSGetReal128に置き換えられた.

int MLGetReal128(MLINK link,mlextended_double *d)

link から拡張精度浮動小数点数を得て,それをd に保持する.

詳細

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

例題

  (1)

#include "mathlink.h"

/* read a extended-precision floating-point number from a link */

void f(MLINK lp)
{
    mlextended_double r;

    if(! MLGetReal128(lp, &r))
        { /* unable to read the floating-point number from lp */ }

    /* ... */
}