WSPutArgCount (C 函数)
int WSPutArgCount(WSLINK link,int n)
指定放在 link 中一个复合函数的自变量数.
范例
基本范例 (1)
#include "wstp.h"
/* send Plus[2,3] over a link */
void f(WSLINK lp)
{
if(! WSPutType(lp, WSTKFUNC))
{ /* unable to send the function type to lp */ }
if(! WSPutArgCount(lp, 2))
{ /* unable to put the number of arguments to lp */ }
if(! WSPutSymbol(lp, "Plus"))
{ /* unable to put the symbol to lp */ }
if(! WSPutInteger(lp, 2))
{ /* unable to put the integer to lp */ }
if(! WSPutInteger(lp, 3))
{ /* unable to put the integer to lp */ }
if(! WSEndPacket(lp))
{ /* unable to send the end-of-packet indicator */ }
if(! WSFlush(lp))
{ /* unable to flush the link-output buffer */ }
}