WSNewPacket (C 函数)
int WSNewPacket(WSLINK link)
跳到 link 中当前数据包的结尾处.
范例
基本范例 (1)
#include "wstp.h"
/* read the next number from a link and ignore everything else */
void f(WSLINK lp)
{
/* determine the type of the data on the link */
switch(WSGetType(lp))
{
case WSTKINT:
/* integer data */
break;
case WSTKREAL:
/* floating point data */
break;
default:
/* Skip to the next packet if not a number. */
if(! WSNewPacket(lp))
{ /* unable to jump ahead to the next packet on lp */ }
}
}