WSPutSymbol (C 函数)
int WSPutSymbol(WSLINK link,const char *s)
把由字符字符串 s 给定名称的符号写入由 link 指定的 WSTP 连接.
范例
基本范例 (1)
#include "wstp.h"
/* send the expression Integrate[Sin[x],x] to a link */
void f(WSLINK lp)
{
if(! WSPutFunction(lp, "Integrate", 2))
{ /* unable to put the function to lp */ }
if(! WSPutFunction(lp, "Sin", 1))
{ /* unable to put the function to lp */ }
if(! WSPutSymbol(lp, "x"))
{ /* unable to put the symbol to lp */ }
if(! WSPutSymbol(lp, "x"))
{ /* unable to put the symbol to lp */ }
if(! WSEndPacket(lp))
{ /* unable to send the end-of-packet indicator to lp */ }
if(! WSFlush(lp))
{ /* unable to flush any outgoing data buffered in lp */ }
}