WSPutUTF32String (C 関数)
int WSPutUTF32String(WSLINK link,const unsigned int *s,int len)
長さ len のUTF-32文字列 s を,link で指定されたWSTP接続に置く.
例題
例 (1)
#include "wst.h"
/* send the expression N[10/Sin[2]] as a UTF-32 string to a link */
void f(WSLINK lp)
{
unsigned int expr[13];
expr[0] = 0xFEFF;
expr[1] = 'N';
expr[2] = '[';
expr[3] = '1';
expr[4] = '0';
expr[5] = '/';
expr[6] = 'S';
expr[7] = 'i';
expr[8] = 'n';
expr[9] = '[';
expr[10] = '2';
expr[11] = ']';
expr[12] = ']';
if(! WSPutFunction(lp, "EvaluatePacket", 1))
{ /* unable to put the function to lp */ }
if(! WSPutFunction(lp, "ToExpression", 1))
{ /* unable to put the function to lp */ }
if(! WSPutUTF32String(lp, (const unsigned int *)expr, 13))
{ /* unable to put the expression string to lp */ }
if(! WSEndPacket(lp))
{ /* unable to put the end-of-packet indicator to lp */ }
if(! WSFlush(lp))
{ /* unable to flush any outgoing data buffered in lp */ }
}