|
SOLUTIONS
|
MLPutByteSymbol()
int MLPutByteSymbol(MLINK link, const unsigned char *s, long l)
長さl の文字列s によって名前が与えられる記号をlink で指定されたMathLink 接続に置く.
詳細詳細
- MLPutByteSymbol()は8ビットで表現できる全範囲の文字を転送することができる.
- 文字列が空バイトで終る必要はない.
- MLPutByteSymbol()はエラーがあると0を返し,関数が成功すると0以外の値を返す.
- MLError()を使うと,MLPutByteSymbol()が不成功の場合にエラーコードを引き出すことができる.
- MLPutByteSymbol()はMathLink ヘッダファイルmathlink.hの中で宣言される.
例題例題すべて開くすべて閉じる
例 (1)例 (1)
#include "mathlink.h"
/* send the expression Integrate[Cos[y],y] to a link */
void f(MLINK lp)
{
if(! MLPutFunction(lp, "Integrate", 2))
{ /* unable to put the function to lp */ }
if(! MLPutFunction(lp, "Cos", 1))
{ /* unable to put the function to lp */ }
if(! MLPutByteSymbol(lp, "y", 1))
{ /* unable to put the symbol to lp */ }
if(! MLPutByteSymbol(lp, "y", 1))
{ /* unable to put the symbol to lp */ }
if(! MLEndPacket(lp))
{ /* unable to send the end-of-packet indicator to lp */ }
if(! MLFlush(lp))
{ /* unable to flush any outgoing data buffered in lp */ }
}
バージョン 3 の新機能 | バージョン 6 での修正機能
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
