WSPutUCS2Function (C 関数)
int WSPutUCS2Function(( WSLINK l , const unsigned short * s , int v , int n )
長さ v の名前 s を持つUCS2でコード化された記号によって与えられる頭部と,n 個の引数を持つ関数を,l で指定されたWSTP接続に置く.
例題
例 (1)
#include "wstp.h"
/* A function to put a List[1,2,3] to the link */
void f(WSLINK l)
{
unsigned short name[4];
name[0] = 'L';
name[1] = 'i';
name[2] = 's';
name[3] = 't';
if(! WSPutUCS2Function(l, (unsigned short *)name, 4, 3))
{ /* Unable to put the function to the link */ }
if(! WSPutInteger8(l, 1))
{ /* Unable to put 1 to the link */ }
if(! WSPutInteger8(l, 2))
{ /* Unable to put 2 to the link */ }
if(! WSPutInteger8(l, 3))
{ /* Unable to put 3 to the link */ }
if(! WSEndPacket(l))
{ /* Unable to send the end-of-packet sequence to the link */ }
if(! WSFlush(l))
{ /* Unable to flush any buffered output data in the link */ }
}