Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > MathLink C言語関数 >
MathLink C 関数

MLPutInteger32()

int MLPutInteger32(MLINK link, int i)
32ビットの整数ilink で指定されたMathLink 接続に置く.
  • MLPutInteger32()はエラーがあると0を返し, 関数が成功すると0以外の値を返す.
  • MLError()を使うと,MLPutInteger32()が不成功の場合にエラーコードを引き出すことができる.
  • 任意精度の整数は,まず桁数のリストを与え,次にFromDigitsを使ってそのリストを数字に変換すれば,Mathematica に送信することができる.
  • MLPutInteger32()MathLink ヘッダファイルmathlink.hの中で宣言される.
#include "mathlink.h"

/* send the expression Times[10,30] to a link */

void f(MLINK lp)
{
    if(! MLPutFunction(lp, "Times", 2))
        { /* unable to send the function to lp */ }

    if(! MLPutInteger32(lp, 10))
        { /* unable to send the integer to lp */ }

    if(! MLPutInteger32(lp, 30))
        { /* unable to send the integer to lp */ }

    if(! MLEndPacket(lp))
        { /* unable to send the end-of-packet sequence to lp */ }

    if(! MLFlush(lp))
        { /* unable flush any buffered outgoing data in lp */ }
}
© 2013 Wolfram Research, Inc. English
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team