MLPutInteger8 (C 関数)

MLPutInteger8WSPutInteger8に置き換えられた.

int MLPutInteger8(( MLINK l , unsigned char i )

l で指定されたMathLink接続に8ビットの整数 i を置く.

詳細

  • MLPutInteger8()は,エラーが起った場合には0を,関数が成功した場合には非零の値を返す.
  • MLPutInteger8()が失敗した場合には,MLError()を使ってエラーコードを得るとよい.
  • MLPutInteger8()は,MathLinkヘッダファイルmathlink.hで宣言される.

例題

  (1)

#include "mathlink"

/* A function to send the expression Plus[3,126] to a link */

void f(MLINK l)
{
    unsigned char a = 3;
    unsigned char b = 126;

    if(! MLPutFunction(l, "Plus", 2))
    { /* Unable to put the function to the link */ }

    if(! MLPutInteger8(l, a))
    { /* Unable to put the integer 3 to the link */ }

    if(! MLPutInteger8(l, b))
    { /* Unable to put the integer 126 to the link */ }

    if(! MLEndPacket(l))
    { /* Unable to send the end-of-packet indicator to the link */ }

    if(! MLFlush(l))
    { /* Unable to flush the outgoing data to the link */ }
}