This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


MLINK MLFromLinkID(MLENV env, long inumb)
returns the link object with ID number inumb in the MathLink environment env.
  • If no link object in the environment env has the ID number inumb, MLFromLinkID() returns (MLINK)0.
  • MLFromLinkID() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* read data from the link represented by id */

void f(MLENV env, long id)
    MLINK lp;

    lp = MLFromLinkID(env, id);
    if(lp (MLINK)0)
        { /* unable to get the link from the id number */ }

    /* determine the type of data on lp */
        /* ... */

    /* ... */