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

has been replaced by WSGetNext.

int MLGetNext(MLINK link)
goes to the next object on link and returns its type.

DetailsDetails

  • The following token values can be returned:
  • MLTKERRerror
    MLTKINTinteger
    MLTKFUNCcomposite function
    MLTKREALapproximate real number
    MLTKSTRcharacter string
    MLTKSYMsymbol
    MLTKOLDINTinteger from older versions of the MathLink library
    MLTKOLDREALapproximate real number from older versions of the MathLink library
    MLTKOLDSTRcharacter string from older versions of the MathLink library
    MLTKOLDSYMsymbol from older versions of the MathLink library
    MLTKOPTSTRcharacter string from newest versions of the MathLink library
    MLTKOPTSYMsymbol from newest versions of the MathLink library
  • MLTKINT and MLTKREAL do not necessarily signify numbers that can be stored in C int and double variables.
  • MLGetNext() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "mathlink.h"

/* read the next type from the link */

void f(MLINK lp)
{
    int data;

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