MLPutInteger8Array (C Function)
MLPutInteger8Array has been replaced by WSPutInteger8Array.
int MLPutInteger8Array( MLINK l , const unsigned char * a , const int * d , const char ** h , int d )
puts an array of 8-bit integers to the MathLink connection specified by l to form a depth-d array with dimensions d.
Details

- The array a must be laid out in memory like a C array declared explicitly as unsigned char a[m][n]... .
- If h is given as NULL, the array will be assumed to have head List at every level.
- The length of the array at level i is taken to be d[i].
- MLPutInteger8Array() returns 0 in the event of an error, and a nonzero value if the function succeeds.
- Use MLError() to retrieve the error code if MLPutInteger8Array() fails.
- MLPutInteger8Array() is declared in the MathLink header file mathlink.h.
Examples
Basic Examples (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 */ }
}