This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


int MLPutUTF32Symbol(MLINK link, const unsigned int *s, int len)
puts a symbol whose name is given by UTF-32 encoded string s with length len to the MathLink connection specified by link.
  • The symbol must be encoded in the UTF-32 character encoding form.
  • MLPutUTF32Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLPutUTF32Symbol() fails.
  • MLPutUTF32Symbol() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

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

void f(MLINK lp)
    unsigned int symb[10];

    symb[0] = '$';
    symb[1] = 'S';
    symb[2] = 'e';
    symb[3] = 's';
    symb[4] = 's';
    symb[5] = 'i';
    symb[6] = 'o';
    symb[7] = 'n';
    symb[8] = 'I';
    symb[9] = 'D';

    if(! MLPutUTF32Symbol(lp, (const unsigned int *)symb, 10))
        { /* unable to send the symbol to lp */ }