组态王WHILE怎么循环
答案:3 悬赏:20 手机版
解决时间 2021-12-03 16:19
- 提问者网友:呐年旧曙光
- 2021-12-02 17:44
组态王WHILE怎么循环
最佳答案
- 五星知识达人网友:摆渡翁
- 2021-12-02 18:42
When condition of expression in while () is true, execute a statements in {} l circularly. Its syntax is the following:
While (expression)
}
One statement or statements (end with ;)
}
Note:
Like the IF statement, if WHIL has one statement in the {}, {} can be ignored, bur statements in the {}, {} cannot be ignored. Please use it carefully, or it can lead dead loop
Example 1:
While (loop<=10)
{
ReportSetCellvalue(“Real time print”, loop, 1, liquid level of material tank)
Loop=loop+1
}
When tag loop is less than or equal to 10, add value of liquid level of material tank to the row 1-10 of first column in a report. Must make expression of while satisfy condition then exit a loop.
While (expression)
}
One statement or statements (end with ;)
}
Note:
Like the IF statement, if WHIL has one statement in the {}, {} can be ignored, bur statements in the {}, {} cannot be ignored. Please use it carefully, or it can lead dead loop
Example 1:
While (loop<=10)
{
ReportSetCellvalue(“Real time print”, loop, 1, liquid level of material tank)
Loop=loop+1
}
When tag loop is less than or equal to 10, add value of liquid level of material tank to the row 1-10 of first column in a report. Must make expression of while satisfy condition then exit a loop.
全部回答
- 1楼网友:十年萤火照君眠
- 2021-12-02 21:04
自己编写个程序看看就知道了。反正我对这个组态中的WHILE不怎么懂。
我写了个程序; a=0 while(a<100){b=1;a=a+1}应该是A加1加1慢慢的加到100可是它一下子到100了。我想可能是WHILE速度快吧。
我写了个程序; a=0 while(a<100){b=1;a=a+1}应该是A加1加1慢慢的加到100可是它一下子到100了。我想可能是WHILE速度快吧。
- 2楼网友:走死在岁月里
- 2021-12-02 19:25
据我所知,组态王脚本命令不支持while的。
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯