Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > MathLink C Language Functions >
MathLink C Function

MLLoopbackOpen()

MLINK MLLoopbackOpen(MLENV env, int *errno)
opens a loopback MathLink connection.
  • In an external program set up with MathLink templates, the environment stdenv should be used.
  • You can use loopback links to effectively store Mathematica expressions.
  • Any expressions written to a loopback link can be read from the same link object.
  • MLLoopbackOpen() stores its error results in errno. If no error occurs errno contains MLEOK.
  • MLLoopbackOpen() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* read data from a link, store it in a loopback link, and return the loopback link */

MLINK f(MLENV env, MLINK link)
{
    MLINK loopbacklink;
    int error;

    loopbacklink = MLLoopbackOpen(env, &error);
    if(loopbacklink (MLINK)0 || error MLEOK)
        { /* unable to create loopbacklink */ }

    if(! MLTransferExpression(loopbacklink, link))
        { /* unable to transfer an expression from link to
loopbacklink */ }

    return loopbacklink;    
}
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team