MLGetInteger64()

int MLGetInteger64(MLINK link, mlint64 *i)
gets a 64-bit integer from the MathLink connection specified by link and stores it in i.

DetailsDetails

  • 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 MLError() to retrieve the error code if MLGetInteger64() fails.
  • MLGetInteger64() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples (1)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 */

    /* ... */
}
New to Mathematica? Find your learning path »
Have a question? Ask support »