ricken 发表于 2006-6-1 19:27:37

两个while循环如何才能同时停止

<img src="attachments/dvbbs/2006-6/20066111262543643.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2006-6/20066111262543643.jpg\');}" onmousewheel="return imgzoom(this);" alt="" />

程序框图如上,两个while loop 可以同时运行,但是点Stop后不能让程序停止啊.如何才能让两个while同时停止呢.

ricken 发表于 2006-6-1 21:49:09

<P>不能用本地变量,错误提示如下:</P>
<P>boolean 'stop': Boolean latch action is incompatible with local variables.</P>

zys0904 发表于 2006-6-1 20:44:41

<P>用本地变量就可以了,只要将第二个循环的判断条件用第一个循环的判断条件的本地变量替代就可以了</P>

lgh269 发表于 2006-6-2 07:33:00

<P>不知你为什么要做成这样呢,</P>
<P>而且你要控制的是那个也没有说清楚</P>

ricken 发表于 2006-6-2 16:29:34

<P>看来楼上的没有明白我的意思.</P>
<P>没有什么原因,因为实际工作中要这样做,就是当点击"STOP"按键时使程序停下来.根据我的框图,点STOP时没有动作,程序不能停下来.</P>

dayu7973 发表于 2006-6-2 23:34:04

到stop的属性设置里改一下就可以了,用上面三种按键方式switch whenpressed等,不要用下面那三种

cpubbs 发表于 2006-6-3 01:14:26

如果要全部一起停止,可以用STOP这个节点!这个最快!

ricken 发表于 2006-6-3 17:09:47

<P>谢谢!</P>
<P>已经解决,用的是另外一种变量的方法.</P>

ricken 发表于 2006-6-10 23:18:49

里面加了一个LED,用此LED作本地变量.将此LED连接到第一个STOP.LED的本地变量连接到第二个STOP就可以了.

天边的云 发表于 2006-6-10 06:43:02

不会是全局变量吧
页: [1]
查看完整版本: 两个while循环如何才能同时停止