WSEndPacket (C 函数)
int WSEndPacket(WSLINK link)
在表达式流中插入指示符,说明当前表达式是完整的且可以发送.
范例
基本范例 (1)
#include "wstp.h"
/* send the expression {10, Times[3.56, 10], 1.3} to a link */
void f(WSLINK lp)
{
if(! WSPutFunction(lp, "List", 3))
{ /* unable to send the function List to lp */ }
if(! WSPutInteger32(lp, 10))
{ /* unable to send the integer 10 to lp */ }
if(! WSPutFunction(lp, Times, 2))
{ /* unable to send the function Times to lp */ }
if(! WSPutReal64(lp, 3.56))
{ /* unable to send the double 3.56 to lp */ }
if(! WSPutInteger32(lp, 10))
{ /* unable to send the integer 10 to lp */ }
if(! WSPutReal32(lp, 1.3))
{ /* unable to send the float 1.3 to lp */ }
if(! WSEndPacket(lp))
{ /* unable to send the end of packet message to lp */ }
}