WSPutInteger8 (C 函数)
int WSPutInteger8(( WSLINK l , unsigned char i )
把一个8位整数写入由 l 指定的 WSTP 连接.
范例
基本范例 (1)
#include "wstp.h"
/* A function to send the expression Plus[3,126] to a link */
void f(WSLINK l)
{
unsigned char a = 3;
unsigned char b = 126;
if(! WSPutFunction(l, "Plus", 2))
{ /* Unable to put the function to the link */ }
if(! WSPutInteger8(l, a))
{ /* Unable to put the integer 3 to the link */ }
if(! WSPutInteger8(l, b))
{ /* Unable to put the integer 126 to the link */ }
if(! WSEndPacket(l))
{ /* Unable to send the end-of-packet indicator to the link */ }
if(! WSFlush(l))
{ /* Unable to flush the outgoing data to the link */ }
}