WSSeekToMark (C 函数)
范例
基本范例 (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 */
switch(WSGetNext(lp))
{
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);
}
参见
C 函数: WSCreateMark WSDestroyMark
相关指南
历史
1996年引入 (3.0) | 在以下年份被更新:2007 (6.0)