-->
Page 1 of 1

Understanding "Wait"

PostPosted: Mon Aug 22, 2016 5:08 am
by PhilTilson
I'm gradually working my way through this product!

One thing I am having difficulty grasping is the use of "wait". Would it be fair to compare it with the Visual Basic instruction "doevents"?

If so, then this makes things a lot easier. If not, I'd appreciate guidance!

Phil

Re: Understanding "Wait"

PostPosted: Mon Aug 22, 2016 11:47 am
by Ecoli-557
I too have had some difficulty in understanding program flow, execution, and the notion of 'wait'.
However, I am only just now starting to think I may get to it. Today's code will prove it one way or another.......
I feel your frustration.
Regards.

Re: Understanding "Wait"

PostPosted: Tue Aug 23, 2016 8:46 pm
by Mmiscool
The wait command allows the interpreter to sit in an endless loop answering web browser requests and handling other housekeeping functions. If a wait statement is not in your program the browser interface for it will become unresponsive. If you have an interrupt set on a pin the wait state will allow for that interrupt to be triggered. If a timer is active and the duration to fire has expired it will be fired at while the interpreter is in a wait state.

Gui interactions can't happen unless the interpreter is in a wait state.


Hope this helps.