Page 1 of 1
wait command
Posted: Thu Feb 09, 2012 1:55 am
by kevin11
I can use a wait command, eg, wait until x < 10, but how do I trap the situation of x never becoming less than 10 ?
How do I execute :
wait until x < 10 but don't wait too long as other things need doing
Re: wait command
Posted: Thu Feb 09, 2012 8:48 am
by flintGA2c5a
I don't really understand what you are after here, maybe you can give an example of what you are trying to use it for?
Re: wait command
Posted: Thu Feb 09, 2012 11:09 am
by kevin11
Well, it seems to me that a statement like wait until x < 10 is a good way to hang a program, if for some unforeseen reason x never gets below 10. So a way of programmatically bailing out of the wait in case of a bug.
Having spent most of yesterday with hangs, crashes, and my cards getting randomly renamed, and having to reboot just to get stuff working, and then when the stack opens it goes and hits the bug again, I am wary of a wait command waiting for hell to freeze over !
Re: wait command
Posted: Thu Feb 09, 2012 12:31 pm
by Klaus
Hi guys,
"wait until ..." is always critical, unles you implement a back door,
so you can get out of this loop-of-death if this condition never happens!
I would use something with "send"!

But need more info to give a specific advice here...
Best
Klaus
Re: wait command
Posted: Thu Feb 09, 2012 12:44 pm
by kevin11
Klaus wrote:"wait until ..." is always critical, unles you implement a back door,
so you can get out of this loop-of-death if this condition never happens!
Quite ! When I read the dictionary I thought you gotta be kidding ! That's such a poison pill when developing an app, there's bound to be something that stops the condition from happening.
Ideally the wait command would have two parameters, the first is the condition to check for, the second is a cap on time to wait. In an ideal world, only the first parameter is needed, but when developing code, the second is critical.
Re: wait command
Posted: Thu Feb 09, 2012 2:01 pm
by flintGA2c5a
I have to agree 100%. My first instinct was to do a or operation, but doesn't seem to allow to do this if you use both wait while and wait for. I came up with the following code, but for some reason this does not work even though I think it should:
Code: Select all
put 11 into x
put 5 into alarmTime
wait while the seconds < alarmTime or x>10
answer "broken"
Re: wait command
Posted: Thu Feb 09, 2012 3:21 pm
by dunbarx
I suspect there is a simple and robust way to do what you want.
Can you post a simple concept script?
Craig Newman
Re: wait command
Posted: Thu Feb 09, 2012 3:24 pm
by kevin11
dunbarx wrote:I suspect there is a simple and robust way to do what you want.
So do I !
I've posted a little stack under another topic.
Thanks
Kevin
Re: wait command
Posted: Thu Feb 09, 2012 6:19 pm
by mwieder
Why are you posting the same thing in three different threads? This is getting annoying.
Re: wait command
Posted: Thu Feb 09, 2012 6:37 pm
by kevin11
mwieder wrote:Why are you posting the same thing in three different threads? This is getting annoying.
One thread was about the wait statement, one about detecting end of movements. Different things.
Wasn't sure where to post the stack, so I put it in a third thread.
Quite simple, really, and I apologise for having challenged your intellect.