Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Gene Wirchenko
  Where is Gene Wirchenko?
 Kamloops
 Canada
 Gene Wirchenko
 Tags
Subject: RE: clear events
Thread ID: 395882 Message ID: 395960 # Views: 33 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Tuesday, January 21, 2014 9:13:41 PM         
   


>
> > Because "Clear Events" just tells the runtime to jump behind the current "Read Events" wait-state.
> > That way the code after the "Read Events" runs, for example in "main.PRG".
>
> BUT what is happening here is the code after the clear events is being executed before the code after the read avents is executed.
>

Yes, any code that follows a "Clear Events" line in the current Call Stack level would still run unless there is something like an explicit "Return" or so.
Whereas if I'm not mistaken, your expectation would have been an implicit "return" instead, or even "return to (read-events) master", right?

If so, I would agree that reality is and always was different, and the Help chapter on that topic is somewhat unclear when it says:
"When CLEAR EVENTS is executed, program execution continues on the program line immediately following READ EVENTS."



Regards
-Stefan

ENTIRE THREAD

clear events Posted by Gene Wirchenko @ 1/20/2014 11:44:20 PM
RE: clear events Posted by David Mustakim @ 1/20/2014 11:59:51 PM
RE: clear events Posted by Gene Wirchenko @ 1/21/2014 6:36:20 PM
RE: clear events Posted by David Mustakim @ 1/21/2014 8:52:02 PM
RE: clear events Posted by Stefan Wuebbe @ 1/21/2014 7:10:37 AM
RE: clear events Posted by Gene Wirchenko @ 1/21/2014 6:34:10 PM
RE: clear events Posted by Stefan Wuebbe @ 1/21/2014 9:13:41 PM