OpenersNotesSection(Spacer1)Details

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

MLPutInteger16List() 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"

/* send a one-dimensional list of 16-bit integers to a link */

void f(MLINK lp)
{
	short list[10], i;

	for(i = 0; i < 10; i++)
		list[i] = i;

	if(! MLPutInteger16List(lp, (short *)list, 10))
		{ /* unable to send the list to lp */ }
}

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

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