[Coco] signal/intercept routine in Basic09
Robert Gault
robert.gault at worldnet.att.net
Sat Jan 23 19:31:39 EST 2010
Wayne Campbell wrote:
> It seems strange that Basic09 includes ON ERROR GOTO for trapping errors, but does not include something like ON SIGNAL, OR INTERCEPT, or ON BREAK for trapping signals. Errors, not caught with ON ERROR GOTO cause Basic09 to drop into debug mode. Signals also cause Basic09 to drop into debug mode. Why aren't they trappable? I don't know.
>
> I have been looking at F$Icpt. I have also looked in the C manual at intercept() and signal(). Since F$Icpt is the only system call I can find, and since signal() and intercept() are incompatible, I take that to mean both use the F$Icpt call, and deal with it differently.
>
> Has anyone here ever written a signal trap or intercept routine for Basic09? Does anyone here have a clue how to write one? I need to be able to trap all signals that are not fatal to the process. Of course, there are some that cannot be trapped, and that's OK, so long as I can trap the rest.
>
> Wayne
>
Wayne,
It would help to know what is sending the signals to Basic09, what the
signals are going to report, and just how many of these are to be sent.
Depending on the type of signals, there just might be a way to use ON
ERROR GOTO.
More information about the Coco
mailing list