MLSeekToMark (C 函数)
MLSeekToMark 已经被 WSSeekToMark 所取代.
更多信息
- MLSeekToMark() 在错误事件中返回 (MLMARK)0,否则为 mark.
- MLSeekToMark() 在 MathLink 的标头文件 mathlink.h 中被声明.
范例
基本范例 (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);
}
参见
C 函数: MLCreateMark MLDestroyMark
技术笔记
历史
1996年引入 (3.0) | 在以下年份被更新:2007 (6.0)