WSMARK (C 関数)
式の流れの中のマークを表すWSTPのタイプである.
例題
例 (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);
}