This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


int MLPutInteger32List(MLINK link, int *a, int n)
puts a list of n 32-bit integers starting from location a to the MathLink connection specified by link.
  • MLPutInteger32List() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLPutInteger32List() fails.
  • MLPutInteger32List() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* send a one-dimensional list of 32-bit integers to a link */

void f(MLINK lp)
    int list[10], i;

    for(i = 0; i < 10; i++)
        list[i] = i;

    if(! MLPutInteger32List(lp, (int *)list, 10))
        { /* unable to send the list to lp */ }