MLPutSize (C Function)
MLPutSize has been replaced by WSPutSize.
int MLPutSize(MLINK link,int len)
specifies the length in bytes of the textual data to be put on link.
Details
- 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.
Examples
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 */ }
}