WSGetReal128 (C Function)

int WSGetReal128(WSLINK link,wsextended_double *d)

gets an extended-precision floating-point number from link and stores it in d.

Details

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

Examples

Basic Examples  (1)

#include "wstp.h"

/* read a extended-precision floating-point number from a link */

void f(WSLINK lp)
{
    wsextended_double r;

    if(! WSGetReal128(lp, &r))
        { /* unable to read the floating-point number from lp */ }

    /* ... */
}