On Sat, 13 Jan 2018 22:53:26 +0800, David Crayford wrote:

>On 13/01/2018 4:53 PM, Bernd Oppolzer wrote:
>    ...
>I prefer implicit destruction of resources. It takes careful programming
>in C to handle errors and free resources that usually requires lots of
>code. I've always found the best way
>to do that in C is a goto that branches to a cleanup block but oddly
>that seems to be banned by most company coding standards. ...
>
"break"  almost suffices.  Alas, C, unlike Rexx, provides no way to exit a
specific block.

An alternative is a wrapper procedure:
    acqire resources
        call main body code
    cleanup

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to