Rss & SiteMap

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

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

标题:if openint="if00$openint" then cond:=1和cond:=openint="if00$openint"这两句不等价吗?

1楼
tittat 发表于:2011/1/9 11:01:23
用这两句分别配合同样一段代码,屏幕出信号的结果不一样,奇怪哦
2楼
阿火 发表于:2011/1/9 19:42:02

是的,不一样的。

cond:=openint="if00$openint"    cond 的计算结果非0即1

 

if openint="if00$openint" then cond:=1  条件成立,cond的赋值为1 ,否则不重新赋值,即等于之前的cond或者上一周期的cond(具体等于多少看具体情况)

[此贴子已经被作者于2011-1-9 19:43:02编辑过]
3楼
tittat 发表于:2011/1/10 13:46:37

我靠,lee兄厉害!

我tnnd掉进了个好难察觉的陷阱,应该是

cond:=openint="if00$openint";

datt:=0;//差了这一句,结果多出了两个信号
if openint="if00$openint" then datt:=1;

这两句才是等价的。

共3 条记录, 每页显示 10 条, 页签: [1]


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