comp.lang.ada
 help / color / mirror / Atom feed
From: "Grein, Christoph" <christoph.grein@eurocopter.com>
Subject: Re: Entry family
Date: Fri, 22 Nov 2002 06:29:00 +0100 (MET)
Date: 2002-11-22T06:29:00+01:00	[thread overview]
Message-ID: <mailman.1037943305.14879.comp.lang.ada@ada.eu.org> (raw)

> >>---------------------------------------------
> >>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;
> >>
> --------------------------------------------------
> 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;
> --------------------------------------------------

Both programs show the same fat bug. There is no such implicit conversion in 
Ada.

The entry spec and body do not match. Full stop.



             reply	other threads:[~2002-11-22  5:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-22  5:29 Grein, Christoph [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-22 10:49 Entry family Grein, Christoph
2002-11-21 12:14 Grein, Christoph
2002-11-21 14:18 ` evangeli
2002-11-22  1:30 ` Randy Brukardt
2002-11-22 10:39   ` Preben Randhol
2002-11-23 17:21     ` Simon Wright
2002-11-21 11:18 Evangelista Sami
2002-11-21 11:21 ` Preben Randhol
2002-11-21 12:39   ` evangeli
2002-11-21 12:10     ` Preben Randhol
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox