From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80134c7589e7b709 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-09 12:22:14 PST Path: supernews.google.com!sn-xit-02!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttls1.wa.home.com.POSTED!not-for-mail From: "Mark Lundquist" Newsgroups: comp.lang.ada References: Subject: Re: Two questions X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Fri, 09 Mar 2001 20:22:12 GMT NNTP-Posting-Host: 24.20.66.55 X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 984169332 24.20.66.55 (Fri, 09 Mar 2001 12:22:12 PST) NNTP-Posting-Date: Fri, 09 Mar 2001 12:22:12 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: supernews.google.com comp.lang.ada:5579 Date: 2001-03-09T20:22:12+00:00 List-Id: chris.danx wrote in message news:Eg9q6.4382$pR3.821782@news2-win.server.ntlworld.com... > Hi, > two questions, one on exceptions and one on objects or tagged types. > > Where exactly can i put an exception handler? I read in JE's book that you > can put them in loop ... end loop statements after an exit statement. Huh? > I normally put handlers at the end of a routine, and i was supprised to find > you could put them elsewhere. What i want to know is where else can i put > them? In a while loop? In a for loop? In an if? ... etc. >From the Ada 95 syntax cross-reference: handled_sequence_of_statements accept_statement 9.5.2 block_statement 5.6 entry_body 9.5.2 package_body 7.2 subprogram_body 6.3 task_body 9.1 Those are all the places! > > The second is to do with tagged types. Sometimes it is suggested that you > put your 'create routine' -- the initialisation routine -- in a nested > package. Yeah... I remember reading something like that somewhere too, but I don't remember what that's all about. Maybe somebody else does...? Mark Lundquist Rational Software