OpenersNotesSection(Spacer1)Details

The array a is laid out in memory like a C array declared as double a[m][n]….

heads gives a list of character strings corresponding to the names of symbols that appear as heads at each level in the array.

MLGetReal64Array() allocates memory which must be released by calling (NonWLLink[MLReleaseReal64Array(), paclet:ref/c/MLReleaseReal64Array]). If MLGetReal64Array() fails and the function's return value indicates an error, do not call (NonWLLink[MLReleaseReal64Array(), paclet:ref/c/MLReleaseReal64Array])on the contents of a.

MLGetReal64Array() returns immutable data.

MLGetReal64Array() 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 MLGetReal64Array() fails.

MLGetReal64Array() 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 an array of double-precision floating-point numbers from a link */

void f(MLINK lp)
{
	double *data;
	int *dims;
	char **heads;
	int d; /* stores the rank of the array */

	if(! MLGetReal64Array(lp, &data, &dims, &heads, &d))
		{
			/* unable to read the array from lp */
			return;
		}

	/* ... */

	MLReleaseReal64Array(lp, data, dims, heads, d);	
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLGetReal32Array(), paclet:ref/c/MLGetReal32Array])  ▪  (NonWLLink[MLGetReal128Array(), paclet:ref/c/MLGetReal128Array])}})}})

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