MLPutInteger8Array (C 関数)
MLPutInteger8ArrayはWSPutInteger8Arrayに置き換えられた.
int MLPutInteger8Array( MLINK l , unsigned char * a , int * d , char ** h , int d )
l で指定されたMathLink接続を8ビットの整数の配列に置き,次元 d で深さ d の配列を形成する.
詳細

- 配列 a は,unsigned char a[m][n]... として明示的に宣言されるC配列のように,メモリに並べられなければならない.
- h がNULLとして与えられると,その配列は各レベルで頭部Listを持つと想定される.
- レベル i における配列の長さは,d[i]であるとされる.
- MLPutInteger8Array()は,エラーが起った場合には0を,関数が成功した場合には非零の値を返す.
- MLPutInteger8Array()が失敗した場合には,MLError()を使ってエラーコードを得るとよい.
- MLPutInteger8Array()は,MathLinkヘッダファイルmathlink.hで宣言される.
例題
例 (1)
#include "mathlink.h"
/* A function to send an array of 8-bit integers to a link */
void f(MLINK l)
{
unsigned char array[6][10][2][1];
int dims[4];
int i;
for(i = 0; i < 120; i++)
*((unsigned char *)array + i) = i;
dims[0] = 6;
dims[1] = 10;
dims[2] = 2;
dims[3] = 1;
if(! MLPutInteger8Array(l, (unsigned char *)array, (int *)dims, (char **)0, 4))
{ /* Unable to write the array to the link */ }
}