#include "mathlink.h"
/* send the expression Integrate[Cos[y],y] to a link */
void f(MLINK lp)
{
if(! MLPutFunction(lp, "Integrate", 2))
{ /* unable to put the function to lp */ }
if(! MLPutFunction(lp, "Cos", 1))
{ /* unable to put the function to lp */ }
if(! MLPutByteSymbol(lp, "y", 1))
{ /* unable to put the symbol to lp */ }
if(! MLPutByteSymbol(lp, "y", 1))
{ /* unable to put the symbol to lp */ }
if(! MLEndPacket(lp))
{ /* unable to send the end-of-packet indicator to lp */ }
if(! MLFlush(lp))
{ /* unable to flush any outgoing data buffered in lp */ }
}