Mathematica > MathLink C Language Functions >
MathLink C Function

MLErrorMessage()

const char * MLErrorMessage(MLINK link)
returns a character string describing the last error to occur on link.
  • MLErrorMessage() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* send the double precision floating-point number 3.22 to a link and print an error message if the send fails */

void f(MLINK lp)
{
    if(! MLPutReal64(lp, 3.22))
    {
        /* unable to send 3.22 to lp */
        printf("MathLink Error: %s\n", MLErrorMessage(lp));
    }

    /* ... */
}
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team