WSPutInteger8Array (C 函数)
int WSPutInteger8Array( WSLINK l , const unsigned char * a , const int * d , const char ** h , int d )
把一个8位整数数组写入由 l 指定的 WSTP 连接,以形成维数为 d 的深度-d 数组.
范例
基本范例 (1)
#include "wstp.h"
/* A function to send an array of 8-bit integers to a link */
void f(WSLINK 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(! WSPutInteger8Array(l, (unsigned char *)array, (int *)dims, (char **)0, 4))
{ /* Unable to write the array to the link */ }
}