Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[讨论]else if问题。

1楼
z7c9 发表于:2010/12/24 11:42:46

Test1

runmode:0;

if true then
msgout(1,'1');
else if true then
msgout(1,'2');
else if true then
msgout(1,'3');

 

Test2

runmode:0;

if true then
msgout(1,'1');
else if true then
msgout(1,'2');
else if true then
msgout(1,'3');

cc:=ref(close,1);
 

 

Test1能通过编译,Test2不能通过编译,什么原因?

 

[此贴子已经被作者于2010-12-24 11:43:39编辑过]
2楼
董小球 发表于:2010/12/24 13:28:21
cc:=ref(close,1);  放到最前面就可以了
3楼
z7c9 发表于:2010/12/24 13:39:23
以下是引用董小球在2010-12-24 13:28:21的发言:
cc:=ref(close,1);  放到最前面就可以了

为什么放到后面不行?

4楼
董小球 发表于:2010/12/24 15:25:47

你看报错原因了么? 因为你没加begin end

程序误以为是ref用在了if函数里

而这种应用是不被允许的

5楼
z7c9 发表于:2011/11/14 20:16:13

还是不支持 else if 语法?

6楼
王锋 发表于:2011/11/14 23:02:09
2.75版,TEST2可以正常编译
共6 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.06934 s, 3 queries.