Posted by Barbara Brazil on September 24, 2015 at 14:07:16:
In Reply to: Re: GOSUB stack posted by Grant Foraker on September 18, 2015 at 14:02:53:
You are correct. The documentation for user defined procs is lacking. When they were introduced, Jim wrote a demo program with several examples. It's called ProcTest.ibs and you'll find it in XTL. It uses both string and numeric functions as well as CALL subroutines. NumTest.ibs also in XTL was written by Justin to test all the new trig functions in Comet32. It uses CALL subroutines extensively.
I'm not sure about your GOSUB issue. If you want to delete pending events from the queue maybe you should try flushing the queue. Brian uses this trick after displaying a messagebox while processing focus messages to prevent getting stuck in a loop. Don't know if it'll work in your case. Here's the code:
Pause(5) ! Give some time for the events to be sent
EventSub ! Clear any pending events
EventSub EventHandler CW.Event$ CW.Source$ ! re-Set EventSub address
You can see examples of its use in the HowTo demo programs.
Post a Followup
Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.