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

int WSGetInteger64List(WSLINK link,mlint64 **a,int *n)
gets a list of native 64-bit integers from the WSTP connection specified by link, storing the integers in the array a and the length of the list in n.

DetailsDetails

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

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

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

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

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

    /* ... */

    WSReleaseInteger64List(lp, data, length);
}