WSGetReal128Array (C Function)
- The array a is laid out in memory like a C array declared as wsextended_double a[m][n]….
- heads gives a list of character strings corresponding to the names of symbols that appear as heads at each level in the array.
- WSGetReal128Array() allocates memory which must be disowned by calling WSReleaseReal128Array(). If WSGetReal128Array() fails and the function's return value indicates an error, do not call WSReleaseReal128Array()on the contents of a.
- WSGetReal128Array() returns immutable data.
- WSGetReal128Array() returns 0 in the event of an error, and a nonzero value if the function succeeds.
- Use WSError() to retrieve the error code if WSGetReal128Array() fails.
- WSGetReal128Array() is declared in the WSTP header file wstp.h.
Basic Examples (1)
/* read an array of extended-precision floating-point numbers from a link */
void f(WSLINK lp)
if(! WSGetReal128Array(lp, &data, &dims, &heads, &d))
/* unable to read the array of numbers from lp */
/* ... */
WSReleaseReal128Array(lp, data, dims, heads, d);
Introduced in 2007