This feature is not supported on the Wolfram Cloud.

int WSGetReal32(WSLINK link,float *x)
gets a single-precision floating-point number from link and stores it as a float in x.


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

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

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

void f(WSLINK lp)
    float r;

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

    /* ... */
Translate this page: