#include "mathlink.h"
/* send the expression Times[10,30] to a link */
void f(MLINK lp)
{
short a = 10;
short b = 30;
if(! MLPutFunction(lp, "Times", 2))
{ /* unable to put the function to lp */ }
if(! MLPutInteger16(lp, a))
{ /* unable to put the integer to lp */ }
if(! MLPutInteger16(lp, b))
{ /* unable to put the integer to lp */ }
if(! MLEndPacket(lp))
{ /* unable to send the end-of-packet indicator to lp */ }
if(! MLFlush(lp))
{ /* unable to flush outgoing data to lp */ }
}