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,1e4bb63e08046e1a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-30 23:02:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!uio.no!newsfeed.song.fi!nntp.inet.fi!central.inet.fi!inet.fi!read2.inet.fi.POSTED!not-for-mail From: "Anders Wirzenius" Newsgroups: comp.lang.ada References: <3DB8204B.2080804@attbi.com> <3DB89B83.2060609@acm.org> <1b585154.0210291023.70af4929@posting.google.com> <1b585154.0210301157.5358caa1@posting.google.com> Subject: Re: In case statment? (was Re: is exception when others => null; smart?) 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: Thu, 31 Oct 2002 07:02:43 GMT NNTP-Posting-Host: 194.251.142.2 X-Trace: read2.inet.fi 1036047763 194.251.142.2 (Thu, 31 Oct 2002 09:02:43 EET) NNTP-Posting-Date: Thu, 31 Oct 2002 09:02:43 EET Organization: Sonera corp Internet services Xref: archiver1.google.com comp.lang.ada:30246 Date: 2002-10-31T07:02:43+00:00 List-Id: "Peter Richtmyer" wrote in message news:1b585154.0210301157.5358caa1@posting.google.com... > "Anders Wirzenius" wrote in message news:... > > > > But if you move the assignment to after begin, the Gnat behaviour changes: > > ... > > a : character; > > for a'size use 8; > > b : boolean := false; > > for b'address use a'address; > > for b'size use 8; > > > > begin > > a := character'val(2#11111111#); > > ... > > and the program execution ends up under when others => > > > > Anders > > Were you using Gnat ? > > I tried it your way and still got the exception (which is the > behavior I like). I also tried it your way, but with the 'a' > data definition of null char: > > a : character := character'val(0); > for a'size use 8; > b : boolean; > for b'address use a'address; > for b'size use 8; > > begin > a := character'val(2#11111111#); > > and still got the exception on Gnat. Which is what I would > expect (on Gnat). > > Peter Sorry, I had made another change, too, and had forgot to mentioned it :-(. I had initialized the variable b: b : boolean := false; which was not in your code. Anders