Article View: borland.public.cppbuilder.nativeapi
Article #16732Re: try, __finally
From: Martin Stainsby
Date: Fri, 25 Apr 2003 20:59
Date: Fri, 25 Apr 2003 20:59
38 lines
1677 bytes
1677 bytes
"Sam S. Firouz" <sfirouz@Hotmail.com> wrote in message
news:3ea98e27@newsgroups.borland.com...
> Hi:
> try
> {
> try
> {
> /* Do something */
> if (/* some condition */)
> return;
> /* Do something */
> }
> catch (...)
> {
> /* Do something */
> }
> }
> __finally
> {
> /* Do something */
> }
>
>
Instead of testing for true and returning , why not test for false and
execute /* Do something */ then let the function return itself.
instead of this
if (/* some condition */)
return;
/* Do something */
try this
if (/* !some condition */)
/* Do something */
Technical Details
Message-ID:
<3ea9a191@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3ea98e27@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b90d541d44cd5edf X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-25 14:04:05 PST Reply-To: "Martin Stainsby" <mstainsbyN0@SPAMntlworld.com> From: "Martin Stainsby" <mstainsbyN0@SPAMntlworld.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ea98e27@newsgroups.borland.com> Subject: Re: try, __finally Date: Fri, 25 Apr 2003 21:59:00 +0100 Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 80.6.253.195 Message-ID: <3ea9a191@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1051304337 80.6.253.195 (25 Apr 2003 13:58:57 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail