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,6d342d02d729296e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-21 05:30:00 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!jussieu.fr!cnam.fr!not-for-mail From: evangeli Newsgroups: comp.lang.ada Subject: Re: Entry family Date: Thu, 21 Nov 2002 15:18:35 +0100 Organization: Conservatoire National des Arts et Metiers Message-ID: <3DDCEB3B.7070506@cnam.fr> References: NNTP-Posting-Host: lmi14.cnam.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: kelvin.cnam.fr 1037884432 4632 163.173.228.14 (21 Nov 2002 13:13:52 GMT) X-Complaints-To: usenet@news.cnam.fr NNTP-Posting-Date: 21 Nov 2002 13:13:52 GMT User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1 X-Accept-Language: en-us Xref: archiver1.google.com comp.lang.ada:31149 Date: 2002-11-21T13:13:52+00:00 List-Id: Grein, Christoph wrote: >>--------------------------------------------- >>procedure Test_Index is >> type Id is mod 10; >> protected type Prot is >> entry E (Boolean); >> end Prot; >> protected body Prot is >> entry E (for I in Id) when True is >> begin >> null; >> end; >> end Prot; >> P : Prot; >>begin >> P.E(True); >>end; >> > > To me, this looks like a fat compiler bug. The entry body shouod be > > entry E (for I in Boolean) when True is > > Report it to ACT (report@gnat.com). > it seems that conversion is made at the run time: example : -------------------------------------------------- procedure test_index is type Id is mod 5; protected type Prot is entry E(Id); end Prot; protected body Prot is entry E(for B in boolean) when true is begin null; end; end Prot; P : Prot; begin -- OK : 0 -> FALSE P.E(0); -- OK : 1 -> TRUE P.E(1); -- CRASHES P.E(2); end; --------------------------------------------------