MLPutUCS2Symbol()

int MLPutUCS2Symbol(MLINK link, const unsigned short *s, int len)
puts a symbol whose name is given by s with length len to the MathLink connection specified by link.

DetailsDetails

  • The symbol must be encoded in the UCS-2 character encoding scheme.
  • MLPutUCS2Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLPutUCS2Symbol() fails.
  • MLPutUCS2Symbol() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

#include "mathlink.h"

/* send the symbol $Version to a link */

void f(MLINK lp)
{
    unsigned short symb[8];

    symb[0] = '$';
    symb[1] = 'V';
    symb[2] = 'e';
    symb[3] = 'r';
    symb[4] = 's';
    symb[5] = 'i';
    symb[6] = 'o';
    symb[7] = 'n';

    if(! MLPutUCS2Symbol(lp, (const unsigned short *)symb, 8))
        { /* unable to send the symbol to lp */ }
}
New to Mathematica? Find your learning path »
Have a question? Ask support »