Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
SIGNAL ON ANY
1) If NOVALUE is happened in mainline then it is trapped.
2) If NOVALUE is happened in the method then it is NOT trapped.
3) Direct RAISE NOVALUE in method is trapped.
Why second point doesn't work ?
Thank you in advance,
A method invocation is just like an external function call. It does not
inherit the SIGNAL settings from its caller. It cannot, actually, since the
label referenced with the original SIGNAL ON call is not even visible inside
the context of the method call.
Can't agree with previous answer:
1) As I wrote before in point 3. Direct RAISE NOVALUE in method is trapped
(the control is transfered to the label defined in SIGNAL ON ANY in the
2) Something like a=0/0 in the method causes SYNTAX condition and the control
is transfered to the label defined in SIGNAL ON ANY in the mainline.
A RAISE instruction terminates the current call context and raises the
condition in the caller. This is trapped because your caller has the issued
the SIGNAL ON ANY instruction.
SIGNAL ON SYNTAX is special as the condition gets propagated to the entire
call stack because it's a terminal condition. Again, your caller's signal trap
gets a chance to trap this.
Thank you for the explanation. It looks like I should include SIGNAL ON ANY in
most of the methods ...