OpenersNotesSection(Spacer1)Details

MLGetReal64List() allocates memory for the array of numbers. You must call (NonWLLink[MLReleaseReal64List(), paclet:ref/c/MLReleaseReal64List]) to disown this memory. If MLGetReal64List() fails and the function's return value indicates an error, do not call (NonWLLink[MLReleaseReal64List(), paclet:ref/c/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 (NonWLLink[MLError(), paclet:ref/c/MLError]) to retrieve the error code if MLGetReal64List() fails.

MLGetReal64List() is declared in the MathLink header file (RefLink[mathlink.h, paclet:ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)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);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLReleaseReal64List(), paclet:ref/c/MLReleaseReal64List])  ▪  (NonWLLink[MLGetReal32List(), paclet:ref/c/MLGetReal32List])  ▪  (NonWLLink[MLGetReal128List(), paclet:ref/c/MLGetReal128List])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}, {▪(RefLinkPlain[Handling Lists, Arrays and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}})}})