|
SOLUTIONS
|
MATHEMATICA MATHLINK C FUNCTION
MLLoopbackOpen()
DetailsDetails
- 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.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
#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;
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
