WSPutInteger64List (C Function)

int WSPutInteger64List(WSLINK link,const wsint64 *a,int n)

puts a list of native 64-bit integers starting from location to the WSTP connection specified by .

Details

  • WSPutInteger64List() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use WSError() to retrieve the error code if WSPutInteger64List() fails.
  • WSPutInteger64List() is declared in the WSTP header file wstp.h.

Examples

Basic Examples  (1)

#include "wstp.h"

/* send a one-dimensional list of 64-bit integers to a link */

void f(WSLINK lp)
{
    wsint64 list[10], i;

    for(i = 0; i < 10; i++)
        list[i] = i;

    if(! WSPutInteger64List(lp, (wsint64 *)list, 10))
        { /* unable to send the list to lp */ }
}