This feature is not supported on the Wolfram Cloud.

is a WSTP type representing a mark in the expression stream.


  • WSMARK is defined in the file wstp.h, which should be included in the source code for any WSTP-compatible program.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

/* look ahead in the expression stream on a link and reset */

void f(WSLINK lp)
    WSMARK mark;
    mark = WSCreateMark(lp);
    if(mark == (WSMARK)0)
        { /* unable to create mark in the stream on lp */ }

    /* now peek ahead and see what is coming */
        case WSTKINT:
            /* integer data */
        case WSTKREAL:
            /* floating-point data */

    /* now restore to the original point */
    mark = WSSeekToMark(lp, mark, 0);
    if(mark == (WSMARK)0)
        { /* unable to seek to the mark position in lp */ }

    WSDestroyMark(lp, mark);