WSSeekToMark (C Function)
-
See Also
- C Functions
- WSCreateMark
- WSDestroyMark
- Related Guides
- Tech Notes
-
-
See Also
- C Functions
- WSCreateMark
- WSDestroyMark
- Related Guides
- Tech Notes
-
See Also
WSSeekToMark (C Function)
Examples
Basic Examples (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);
}
See Also
C Functions: WSCreateMark WSDestroyMark
Related Guides
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)