This feature is not supported on the Wolfram Cloud.

MLGetArgCount has been replaced by WSGetArgCount.

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


  • MLGetArgCount() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "mathlink.h"

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

int f(MLINK lp)
    int a;

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

    /* ... */