int WSGetInteger64(WSLINK link,wsint64 *i)

gets a native 64-bit integer from the WSTP connection specified by link and stores it in i.


  • If the data on the link corresponds to a real number, WSGetInteger64() will round it to a 64-bit integer.
  • If the data on the link corresponds to an integer too large to store in a 64-bit C type, or the 32-bit structure on your computer system, then WSGetInteger64() will fail, and return 0.
  • WSGetInteger64() returns a nonzero value if the function succeeds.
  • Use WSError() to retrieve the error code if WSGetInteger64() fails.
  • WSGetInteger64() is declared in the WSTP header file wstp.h.


Basic Examples  (1)

#include "wstp.h"

/* read a 64-bit integer from a link */

void f(WSLINK lp)
    wsint64 data;

    if(! WSGetInteger64(lp, &data))
        { /* unable to read a 64-bit integer from lp */

    /* ... */

See Also

WSGetInteger16()  WSGetInteger32()