以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://www.weistock.com/bbs/list.asp?boardid=2)
----  numtostr(stklabel,0)出错  (http://www.weistock.com/bbs/dispbbs.asp?boardid=2&id=142005)

--  作者:JDS
--  发布时间:2016/10/31 15:12:08
--  numtostr(stklabel,0)出错
股票交易发现

SENDPHONEMSG(\'关注\'   &numtostr(stklabel,0) ,0);
结果手机监控收到的信息是:关注1000004。1000004代码是错误的。

SENDPHONEMSG(\'关注\'   &numtostr(DYNAINFO(7),2) &numtostr(stklabel,0) ,0);
结果手机监控收到的信息是:关注39.58 1000000。1000000代码是错误的。



--  作者:王锋
--  发布时间:2016/10/31 17:15:12
--  
SENDPHONEMSG(\'关注\'   &stklabel ,0);

--  作者:JDS
--  发布时间:2016/11/1 13:31:33
--  
以下是引用王锋在2016-10-31 17:15:12的发言:
SENDPHONEMSG(\'关注\'   &stklabel ,0);
SENDPHONEMSG(\'关注\'   &numtostr(DYNAINFO(7),2) &stklabel ,0);
想输出价格与代码之间有空格或分隔符,怎么办?
如下
SENDPHONEMSG(\'关注\'   &numtostr(DYNAINFO(7),2)& DRAWNULL&stklabel ,0);
结果输出为7.43-1600868

--  作者:JDS
--  发布时间:2016/11/1 13:38:13
--  
如下
SENDPHONEMSG(\'关注\'   &numtostr(DYNAINFO(7),2)& &numtostr(DRAWNULL,0)&stklabel ,0);
结果输出为:关注7.43-1600868
 

我们希望得到的结果是:关注7.43  600868  或  7.43 / 600868 或  7.43 #600868
怎么办

--  作者:wenarm
--  发布时间:2016/11/1 13:52:30
--  

在你需要加空格或者其他字符的位置,使用&将其串联,例如   string1+空格 + string2

string1&\' \'&string2表达的就是string1 string2

[此贴子已经被作者于2016-11-1 13:52:51编辑过]

--  作者:JDS
--  发布时间:2016/11/1 13:59:27
--  
谢谢