MLGetReal64List()

int MLGetReal64List(MLINK link, double **a, int *n)
gets a list of double-precision floating-point numbers from the MathLink connection specified by link, storing the numbers in array a and the length of the list in n.

DetailsDetails

  • MLGetReal64List() allocates memory for the array of numbers. You must call MLReleaseReal64List() to disown this memory. If MLGetReal64List() fails and the function's return value indicates an error, do not call MLReleaseReal64List() on the contents of a.
  • MLGetReal64List() returns immutable data.
  • MLGetReal64List() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLGetReal64List() fails.
  • MLGetReal64List() 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 double-precision floating-point numbers from a link */

void f(MLINK lp)
{
    double *list;
    int length;

    if(! MLGetReal64List(lp, &list, &length))
        {
            /* unable to read the list of numbers from lp */
            return;
        }

    /* ... */

    MLReleaseReal64List(lp, list, length);
}
New to Mathematica? Find your learning path »
Have a question? Ask support »