WSPutInteger64 (C Function)

int WSPutInteger64(WSLINK link,wsint64 i)

puts the native 64-bit integer i to the WSTP connection specified by link.

Details

  • You can send arbitrary-precision integers to the Wolfram Language by giving lists of digits, then converting them to numbers using FromDigits.
  • WSPutInteger64() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use WSError() to retrieve the error code if WSPutInteger64() fails.
  • WSPutInteger64() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

/* send a 64-bit number to a link */

void f(WSLINK lp)
{
    wsint64 a;

    a = 0x6553600065535;

    if(! WSPutInteger64(lp, a))
        { /* unable to send the 64 bit integer to lp */ }
}