MLGetArgCount (C Function)

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.

Details

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

Examples

Basic Examples  (1)

#include "mathlink.h"

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

int f(MLINK lp)
{
    int a;

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

    /* ... */
}