MLPutReal64 (C 函数)

MLPutReal64 已经被 WSPutReal64 所取代.

int MLPutReal64(MLINK link,double x)

把双精度浮点数 x 写入由 link 指定的 MathLink 连接.

更多信息

  • MLPutReal64() 在错误事件中返回0,如果函数成功则返回非零值.
  • 如果 MLPutReal64() 失败,则使用 MLError() 检索错误代码.
  • 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 */ }
}