MLMARK (C 函数)

MLMARK 已经被 WSMARK 所取代.

是一个表示在表达式流中的标记的 MathLink 类型.

更多信息

  • MLMARKmathlink.h 文件中被定义,它应该被包含在任何 MathLink 兼容程序的源代码中.

范例

基本范例  (1)

#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 */
    switch(MLGetNext(lp))
    {
        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);
}