MLGetInteger32List()
This feature is not supported on the Wolfram Cloud.

has been replaced by WSGetInteger32List.

int MLGetInteger32List(MLINK link,int **a,int *n)
gets a list of 32-bit integers from the MathLink connection specified by link, storing the integers in the array a and the length of the list in n.

DetailsDetails

  • MLGetInteger32List() allocates memory for the array of integers. You must call MLReleaseInteger32List() to disown this memory. If MLGetInteger32List() fails and the function's return value indicates an error, do not call MLReleaseInteger32List() on the contents of a.
  • MLGetInteger32List() returns immutable data.
  • MLGetInteger32List() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLGetInteger32List() fails.
  • MLGetInteger32List() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "mathlink.h"

/* read a list of 32-bit integers from a link */

void f(MLINK lp)
{
    int *data;
    int length;

    if(! MLGetInteger32List(lp, &data, &length))
        {
            /* unable to read the integer list from lp */
            return;
        }

    /* ... */

    MLReleaseInteger32List(lp, data, length);
}