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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,80134c7589e7b709,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-09 10:33:01 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!grolier!btnet-peer0!btnet!news5-gui.server.ntli.net!ntli.net!news2-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada Subject: Two questions X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Fri, 9 Mar 2001 18:27:45 -0000 NNTP-Posting-Host: 62.253.9.176 X-Complaints-To: abuse@ntlworld.com X-Trace: news2-win.server.ntlworld.com 984162468 62.253.9.176 (Fri, 09 Mar 2001 18:27:48 GMT) NNTP-Posting-Date: Fri, 09 Mar 2001 18:27:48 GMT Organization: ntlworld News Service Xref: supernews.google.com comp.lang.ada:5576 Date: 2001-03-09T18:27:45+00:00 List-Id: 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. 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. 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. Others suggest putting it in the same package as the tagged type. Example package something_cool is type cool is tagged private; package constructor is procedure create (c : out cool; ... ... ); end constructor; private ... ... end something_cool; or package something_cool is type cool is tagged private; procedure create (c : out cool; ... ... ); private ... ... end something_cool; What's the difference? Where should i use method 1 and where should i use method 2? Thanks, Chris Campbell