OpenersNotesSection(Spacer1)Details

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

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

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

MLGetInteger8Array() returns immutable data.

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

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

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* A function for reading an array of 8-bit integers from a link */

void f(MLINK l)
{
	unsigned char *data;
	int *dims;
	char **heads;
	int depth;

	if(! MLGetInteger8Array(l, &data, &dims, &heads, &depth))
	{ /* Unable to read the array of integers from l */ }

	/* ... */

	MLReleaseInteger8Array(l, data, dims, heads, depth);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLReleaseInteger8Array(), paclet:/ref/c/MLReleaseInteger8Array])  ▪  (NonWLLink[MLGetInteger16Array(), paclet:/ref/c/MLGetInteger16Array])  ▪  (NonWLLink[MLGetInteger32Array(), paclet:/ref/c/MLGetInteger32Array])  ▪  (NonWLLink[MLGetInteger64Array(), paclet:/ref/c/MLGetInteger64Array])}})}})

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