WSGetNext()
This feature is not supported on the Wolfram Cloud.

int WSGetNext(WSLINK link)
goes to the next object on link and returns its type.

DetailsDetails

  • The following token values can be returned:
  • WSTKERRerror
    WSTKINTinteger
    WSTKFUNCcomposite function
    WSTKREALapproximate real number
    WSTKSTRcharacter string
    WSTKSYMsymbol
    WSTKOLDINTinteger from older versions of the WSTP library
    WSTKOLDREALapproximate real number from older versions of the WSTP library
    WSTKOLDSTRcharacter string from older versions of the WSTP library
    WSTKOLDSYMsymbol from older versions of the WSTP library
    WSTKOPTSTRcharacter string from newest versions of the WSTP library
    WSTKOPTSYMsymbol from newest versions of the WSTP library
  • WSTKINT and WSTKREAL do not necessarily signify numbers that can be stored in C int and double variables.
  • WSGetNext() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* read the next type from the link */

void f(MLINK lp)
{
    int data;

    switch(WSGetNext(lp))
    {
        case MLTKINT:
            if(! WSGetInteger32(lp, &data))
                { /* unable to read the integer from lp */ }
        /* ... */
    }
}