MLPutRealNumberAsString (C 関数)
MLPutRealNumberAsStringはWSPutRealNumberAsStringに置き換えられた.
int MLPutRealNumberAsString(MLINK l, const char *s )
ASCIIの文字列 s としてコード化された浮動小数点数を,l が指定するMathLink接続に送信する.
詳細

- 数 s を"3.14159"の形式で送信する.
- MLPutRealNumberAsString()は,エラーの場合には0を,関数が成功した場合には非零の値を返す.
- MLPutRealNumberAsString()は,MathLinkヘッダファイルmathlink.hで宣言される.
例題
例 (1)
#include "mathlink.h"
/* A function to put the expression Sqrt[2.75] to a link */
void f(MLINK l)
{
if(! MLPutFunction(l, "Sqrt", 1))
{ /* Unable to put Sqrt[] to the link */ }
if(! MLPutRealNumberAsString(l, "2.75"))
{ /* Unable to put the number to the link */}
if(! MLEndPacket(l))
{ /* Unable to put the end-of-packet sequence to l */ }
if(! MLFlush(l))
{ /* Unable to flush any output buffered in l */ }
}