WSGetArgCount (C Function)
-
See Also
- C Functions
- WSGetType()
- WSGetFunction()
- WSGetNext()
- Related Guides
- Tech Notes
WSGetArgCount (C Function)
int WSGetArgCount(WSLINK link,int *n)
finds the number of arguments to a function on link and stores the result in n.
Examples
Basic Examples (1)
#include "wstp.h"
/* check a link for a function and return the number of arguments */
int f(WSLINK lp)
{
int a;
switch(WSGetType(lp))
{
case WSTKFUNC:
/* get the argument size */
if(! WSGetArgCount(lp, &a))
{ /* unable to get the number of arguments from lp */ }
return a;
default:
/* ... */
}
/* ... */
}
See Also
C Functions: WSGetType() WSGetFunction() WSGetNext()
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)