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

has been replaced by .

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

DetailsDetails

  • MLGetRealList() allocates memory for the array of numbers. You must call MLDisownRealList() to disown this memory. If MLGetRealList() fails and the function's return value indicates an error, do not call MLDisownRealList() on the contents of a.
  • MLGetRealList() returns immutable data.
  • MLGetRealList() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLGetRealList() fails.
  • MLGetRealList() is equivalent to MLGetReal64List().

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;
    long length;

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

    /* ... */

    MLDisownRealList(lp, list, length);
}