MLINK (C Function)

MLINK has been replaced by WSLINK.

is a MathLink type representing a MathLink link object.

Details

  • is analogous to LinkObject in Mathematica.
  • MLINK is defined in the file mathlink.h, which should be included in the source code for any MathLink-compatible program.

Examples

Basic Examples  (1)

#include "mathlink.h"

int main(int argc, char **argv)
{
    MLENV ep;
    MLINK lp;
    long error;

    ep = MLInitialize((MLEnvironmentParameter)0);
    if(ep == (MLENV)0)
        { /* unable to initialize environment */ }

    lp = MLOpenArgcArgv(ep, argv, argv + argc, &error);
    if(lp == (MLINK)0 || error != MLEOK)
        { /* unable to create link */ }

    /* ... */

    MLClose(lp);
    MLDeinitialize(ep);
    return 0;
}