MLPutInteger8 (C Function)

MLPutInteger8 has been replaced by WSPutInteger8.

int MLPutInteger8(( MLINK l , unsigned char i )

puts the 8-bit integer i to the MathLink connection specified by l.

Details

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

Examples

Basic Examples  (1)

#include "mathlink"

/* A function to send the expression Plus[3,126] to a link */

void f(MLINK l)
{
    unsigned char a = 3;
    unsigned char b = 126;

    if(! MLPutFunction(l, "Plus", 2))
    { /* Unable to put the function to the link */ }

    if(! MLPutInteger8(l, a))
    { /* Unable to put the integer 3 to the link */ }

    if(! MLPutInteger8(l, b))
    { /* Unable to put the integer 126 to the link */ }

    if(! MLEndPacket(l))
    { /* Unable to send the end-of-packet indicator to the link */ }

    if(! MLFlush(l))
    { /* Unable to flush the outgoing data to the link */ }
}