MLGetInteger64List (C Function)

MLGetInteger64List has been replaced by WSGetInteger64List.

int MLGetInteger64List(MLINK link,mlint64 **a,int *n)

gets a list of native 64-bit integers from the MathLink connection specified by link, storing the integers in the array a and the length of the list in n.

Details

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

Examples

Basic Examples  (1)

#include "mathlink.h"

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

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

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

    /* ... */

    MLReleaseInteger64List(lp, data, length);
}