MLPutRealNumberAsUCS2String (C Function)
MLPutRealNumberAsUCS2String has been replaced by WSPutRealNumberAsUCS2String.
int MLPutRealNumberAsUCS2String(MLINK l, const unsigned short *s)
sends a floating-point number encoded as UCS2 string s to the MathLink connection specified by l.
Details

- Send the number s in the form "3.14159".
- MLPutRealNumberAsUCS2String() returns 0 on error, and a nonzero value if the function succeeds.
- MLPutRealNumberAsUCS2String() is declared in the MathLink header file mathlink.h.
Examples
Basic Examples (1)
#include "mathlink.h"
/* A function to put the expression Sqrt[2.75] to a link */
void f(MLINK l)
{
unsigned short theNumber[5];
theNumber[0] = '2';
theNumber[1] = '.';
theNumber[2] = '7';
theNumber[3] = '5';
theNumber[4] = 0;
if(! MLPutFunction(l, "Sqrt", 1))
{ /* Unable to put Sqrt[] to the link */ }
if(! MLPutRealNumberAsUCS2String(l, theNumber))
{ /* 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 */ }
}