Hi
Of course infinite loops MUST be avoied.
However, they are particularly obnoxious in pda.
Consider this: an app runs in full screen, the dreaded infinite loop starts... the screen goes black. Pressing the power button and restarting the device does nothing. A reset, idem. Only a cold boot
saves you, BUT you need to reset many custom settings.
On desktops, at least you can access the task manager and kill the application.
Any suggestion (short of 'infinite loops should never happen, it's bad programming' with which I agree, only the fear of that happening is enough to want to be prepared) on how to deal with the above. In the freepascal forum someone suggessted some Sendmessage from a secondary thread to the main thread.
But this does not work b/c the Execute method of the custom thread stops being called when the infinite loop in the main app happens.