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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f92fbb4a0420dd57 X-Google-Attributes: gid103376,public From: leschkes@ferret.cig.mot.com (Scott Leschke) Subject: Re: some questions re. Ada/GNAT from a C++/GCC user Date: 1996/04/03 Message-ID: #1/1 X-Deja-AN: 145684623 references: <315D902C.6F7B@escmail.orl.mmc.com> <4jmuj5$lkh@dayuc.dayton.saic.com> organization: Motorola Cellular Infrastructure Group newsgroups: comp.lang.ada Date: 1996-04-03T00:00:00+00:00 List-Id: bobduff@world.std.com (Robert A Duff) writes: >In article <4jmuj5$lkh@dayuc.dayton.saic.com>, >John G. Volan wrote: [bunch of stuff deleted...] >>I assume that the only thing that would make sense would be to treat >>every structured statement as the moral equivalent of a begin/end. >You assume right. That is, we're arguing about syntactic sugar; the >semantics doesn't change if you allow declare-begin-end to be left out. Which implies that any of these constructs could have an exception handler region. I've often thought that this might be nice thing to allow in the case of loop constructs. Syntactically I'm not sure I'd like it for some of the other constructs like if-elsif-else or case statements. I find the following, er... unappealing to say the least although maybe it's just my anal sense of style (BTW, I initially tried justifying the exception keyword with the if-elsif-else stuff but that looked worse IMHO :-) if ConditionA then DoA; exception when ExceptionA => ReportError ("A"); elsif ConditionB then DoB; exception when ExceptionB => ReportError ("A"); else DoC; exception when ExceptionC => ReportError ("A"); endif; Ultimately, it would probably make little difference either way. -- Scott Leschke.........................email: leschkes@cig.mot.com Motorola, Inc............................ph: 847-632-2786 1501 W Shure Drive......................fax: 847-632-3145 Arlington Heights, IL 60004......mailstop: 1301