MLPutReal32List()

int MLPutReal32List(MLINK link, float *a, int n)
puts a list of n single-precision floating-point numbers starting from location a to the MathLink connection specified by link.

DetailsDetails

  • MLPutReal32List() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLPutReal32List() fails.
  • MLPutReal32List() is declared in the MathLink header file mathlink.h.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

#include "mathlink.h"

/* send a list of single-precision floating-point numbers to a link */

void f(MLINK lp)
{
    float list[20];
    int i;

    for(i = 0; i < 20; i++)
        list[i] = i + .9;

    if(! MLPutReal32List(lp, (float *)list, 20))
        { /* unable to put the list to lp */ }
}
New to Mathematica? Find your learning path »
Have a question? Ask support »