[fpc-pascal] Metaware

memsom memsom at interalpha.co.uk
Tue Jun 19 13:48:38 CEST 2007


> '?' indeed! I am fascinated! What does yield do exactly... presumably it
> returns a result from the function without closing down that instance of
> the function? Amazing concept.

I suspect - given the word "DOS" in some of the code, it allows a DOS
event loop to continue in a single threaded co-operative multitasking
environment. A bit like Application.ProcessMessages in Delphi or
Application.DoEvents() in DotNet. You can probably do other things at the
same time, but Yield says this to me (maybe my old Mac programming hat as
the Toolbox has a similar API.) If so, it's probably a little redundant
now and use of threads could get around the problem (or even using the
Application object from Lazarus API to implement the
"processmessages"/yield part?)




More information about the fpc-pascal mailing list