Re: GOSUB stack


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

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:

Grant:

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:

FlushEvents:
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
Return

You can see examples of its use in the HowTo demo programs.



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]