This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


is a MathLink type representing a mark in the expression stream.
  • MLMARK is defined in the file mathlink.h, which should be included in the source code for any MathLink-compatible program.
#include "mathlink.h"

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

void f(MLINK lp)
    MLMARK mark;
    mark = MLCreateMark(lp);
    if(mark (MLMARK)0)
        { /* unable to create mark in the stream on lp */ }

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

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

    MLDestroyMark(lp, mark);