|Re: Is multi-level function return possible? email@example.com (2014-03-26)|
|Re: catch and throw, was Is multi-level function return possible? firstname.lastname@example.org (2014-03-27)|
|Re: catch and throw, was Is multi-level function return possible? email@example.com (Bakul Shah) (2014-03-26)|
|Re: catch and throw, was Is multi-level function return possible? firstname.lastname@example.org (mac) (2014-03-28)|
|Re: PL/I exceptions, was catch and throw, was Is multi-level function email@example.com (glen herrmannsfeldt) (2014-03-29)|
|Re: PL/I exceptions firstname.lastname@example.org (Robin Vowels) (2014-03-30)|
|From:||glen herrmannsfeldt <email@example.com>|
|Date:||Sat, 29 Mar 2014 02:40:24 +0000 (UTC)|
|Organization:||Aioe.org NNTP Server|
|References:||14-03-065 14-03-068 14-03-070 14-03-076|
|Keywords:||PL/I, errors, comment|
|Posted-Date:||28 Mar 2014 23:15:55 EDT|
mac <firstname.lastname@example.org> wrote:
(snip on PL/I ON units)
> Not quite the same. ON defined a handler invoked at the signal site. It
> could attempt repair and return. more like an interrupt. However, the
> typical handler did a non-local GOTO to bail out, clearing any calls
> between the signal and the gone-to label.
One I remember, but maybe no-one does anymore. You can use ON ENDPAGE
to paginate output. When an attempt is made to print a line past the
end of the page (an attribute of printable output files) the ENDPAGE
ON unit is executed, which skips to the next page and prints any page
headers. Then return and let the output continue.
ENDFILE, on the other hand, (on input files) most likely goes on to
process the data. It might be that you could close the file, open a
new one and continue on. I never tried that.
For CONVERSION, you can test the invalid character, and, if desired,
replace it with a different one.
For SUBSCRIPTRANGE and STRINGRANGE there likely isn't much to do,
maybe just print a message. You could go process something else, but
usually not much point in trying again.
Java's try/catch, on the other hand, does not have the ability
to fix up and continue.
[ON ENDPAGE was probably to help convert COBOL report writer programs. It's
in the PL/I standard, not just an IBM-ism. -John]
Return to the
Search the comp.compilers archives again.