OpenersNotesSection(Spacer1)Details

If the data on the link corresponds to a real number, MLGetInteger64() will round it to a 64-bit integer.

If the data on the link corresponds to an integer too large to store in a 64-bit C type, or the 32-bit structure on your computer system, then MLGetInteger64() will fail, and return 0.

MLGetInteger64() returns a nonzero value if the function succeeds.

Use (NonWLLink[MLError(), paclet:ref/c/MLError]) to retrieve the error code if MLGetInteger64() fails.

MLGetInteger64() 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 64-bit integer from a link */

void f(MLINK lp)
{
	mlint64 data;

	if(! MLGetInteger64(lp, &data))
		{ /* unable to read a 64-bit integer from lp */

	/* ... */
}

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

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}})}})