🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16734

Re: try, __finally

#16734
From: Sam S. Firouz
Date: Fri, 25 Apr 2003 21:23
51 lines
1937 bytes
I knew the workaround. I was just wondering if this is by design or a
compiler bug.

Sam



"Martin Stainsby" <mstainsbyN0@SPAMntlworld.com> wrote in message
news:3ea9a191@newsgroups.borland.com...
>
> "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: <3ea9a765$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ea98e27@newsgroups.borland.com> <3ea9a191@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:32:30 PST
From: "Sam S. Firouz" <sfirouz@Hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ea98e27@newsgroups.borland.com> <3ea9a191@newsgroups.borland.com>
Subject: Re: try, __finally
Date: Fri, 25 Apr 2003 14:23:50 -0700
Lines: 53
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 165.152.92.188
Message-ID: <3ea9a765$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051305829 165.152.92.188 (25 Apr 2003 14:23:49 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail