OBSOLETE WSTP C FUNCTION

MLPutSize()
This feature is not supported on the Wolfram Cloud.

has been replaced by .

int MLPutSize(MLINK link,int len)
specifies the length in bytes of the textual data to be put on link.

DetailsDetails

  • MLPutSize() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLPutSize() fails.
  • MLPutSize() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "mathlink.h"

/* send the string "Hello World!" to a link */

void f(MLINK lp)
{
    if(! MLPutNext(lp, MLTKSTR))
        { /* unable to put the data type to lp */ }

    if(! MLPutSize(lp, strlen("Hello World!"))
        { /* unable to put the string size to lp */ }

    if(! MPutData(lp, "Hello World!", strlen("Hello World!")))
        { /* Unable to put the string contents to lp */ }
}