#include "mathlink.h"
/* send the expression {10, Times[3.56, 10], 1.3} to a link */
void f(MLINK lp)
{
if(! MLPutFunction(lp, "List", 3))
{ /* unable to send the function List to lp */ }
if(! MLPutInteger32(lp, 10))
{ /* unable to send the integer 10 to lp */ }
if(! MLPutFunction(lp, Times, 2))
{ /* unable to send the function Times to lp */ }
if(! MLPutReal64(lp, 3.56))
{ /* unable to send the double 3.56 to lp */ }
if(! MLPutInteger32(lp, 10))
{ /* unable to send the integer 10 to lp */ }
if(! MLPutReal32(lp, 1.3))
{ /* unable to send the float 1.3 to lp */ }
if(! MLEndPacket(lp))
{ /* unable to send the end of packet message to lp */ }
}