This feature is not supported on the Wolfram Cloud.

int WSGetArgCount(WSLINK link,int *n)
finds the number of arguments to a function on link and stores the result in n.


  • WSGetArgCount() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* check a link for a function and return the number of arguments */

int f(WSLINK lp)
    int a;

        case WSTKFUNC:
            /* get the argument size */
            if(! WSGetArgCount(lp, &a))
                { /* unable to get the number of arguments from lp */ }
            return a;
            /* ... */

    /* ... */