|
SOLUTIONS
|
MATHEMATICA MATHLINK C 関数
MLSeekToMark()
詳細詳細
- MLSeekToMark()はエラーがあると(MLMARK)0を返し,それ以外の場合はmark を返す.
- MLSeekToMark()はMathLink ヘッダファイル mathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (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);
}
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
