#include "mathlink.h"
/* send a string representing an expression to a Mathematica kernel
for evaluation */
void f(MLINK lp)
{
/* construct the packet to be sent to the kernel */
MLPutFunction(lp, "EvaluatePacket", 1);
MLPutFunction(lp, "ToExpression", 1));
MLPutString(lp, (const char *)"3+4/Sqrt[19.2]", 14));
MLEndPacket(lp));
/* send the packet */
if(! MLFlush(lp))
{ /* unable to flush an outgoing data buffered in lp */ }
}