WSPutReal64 (C 函数)
int WSPutReal64(WSLINK link,double x)
把双精度浮点数 x 写入由 link 指定的 WSTP 连接.
范例
基本范例 (1)
#include "wstp.h"
/* put the expression Sqrt[2.7] to a link */
void f(WSLINK lp)
{
if(! WSPutFunction(lp, "Sqrt", 1))
{ /* unable to put Sqrt[] to lp */ }
if(! WSPutReal64(lp, 2.7))
{ /* unable to put 2.7 to lp */ }
if(! WSEndPacket(lp))
{ /* unable to put the end-of-packet sequence to lp */ }
if(! WSFlush(lp))
{ /* unable to flush any output buffered in lp */ }
}