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

MLPutReal64()

int MLPutReal64(MLINK link, double x)
puts the double-precision floating-point number x to the MathLink connection specified by link.
  • MLPutReal64() returns 0 in the event of an error, and a nonzero value otherwise.
  • Use MLError() to retrieve the error code if MLPutReal64() fails.
  • MLPutReal64() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* put the expression Sqrt[2.7] to a link */

void f(MLINK lp)
{
    if(! MLPutFunction(lp, "Sqrt", 1))
        { /* unable to put Sqrt[] to lp */ }

    if(! MLPutReal64(lp, 2.7))
        { /* unable to put 2.7 to lp */ }

    if(! MLEndPacket(lp))
        { /* unable to put the end-of-packet sequence to lp */ }

    if(! MLFlush(lp))
        { /* unable to flush any output buffered in lp */ }
}
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team