乐鑫技术交流
直播中

陈光琦

7年用户 912经验值
私信 关注
[问答]

逻辑运算符在do循环while循环中不起作用怎么处理?

代码:(无效)
msg = \"\"
cnt = 1
do
cnt = cnt + 1
delay 500
loop while len(msg) < 38 or cnt < 22
If cnt > 21 then goto [repet]
代码:(有效)
msg​​ = \"\"
cnt = 1
do
cnt = cnt + 1
If cnt > 21 then goto [repet]
delay 500
loop while len(msg) < 38
问题 1:为什么逻辑“或”停止循环并阻止字符串“味精”加载?
问题 2:使用 goto 指令退出“do/loop while”是否安全?

更多回帖

发帖
×
20
完善资料,
赚取积分