WSPutArgCount (C Function)
int WSPutArgCount(WSLINK link,int n)
specifies the number of arguments of a composite function to be put on link.
Examples
Basic Examples (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 */ }
}