comp.lang.ada
 help / color / mirror / Atom feed
From: "Jack Flynn" <flynnjai@comcast.net>
Subject: Re: enumeration type
Date: Sun, 26 Sep 2004 17:54:38 -0700
Date: 2004-09-26T17:54:38-07:00	[thread overview]
Message-ID: <OZednQE52dtP-crcRVn-vQ@comcast.com> (raw)
In-Reply-To: cj7lvp$ao3$00$1@news.t-online.com


"Rick Santa-Cruz" <rick_santa_cruz75@msn.com> wrote in message 
news:cj7lvp$ao3$00$1@news.t-online.com...
> > I know that such doesn't work in ada, but how can I access the elements 
> > of
> an enumeration directly with the full qualified name?

your post indicates function so try something along these lines:

procedure p is

   type fuzzy is (false,maybe,true);

   function "=" (f : fuzzy;

                           b : boolean) return boolean;

   function "=" (f : fuzzy;

                           b : boolean) return boolean is


   begin

      case f is

         when true =>

            return b;

         when false =>

            return not b;

         when maybe =>

            return false;-- or use more complicated parameterized function 
call

      end case;


   end "=";

   zadeh : fuzzy := maybe;

   good : boolean;

begin

   good := (zadeh = standard.false) and not (zadeh = standard.true);

end p;


>
> Thanks in advance for your help,
> Rick
>
> 





  reply	other threads:[~2004-09-27  0:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-27  0:13 enumeration type Rick Santa-Cruz
2004-09-27  0:54 ` Jack Flynn [this message]
2004-09-27  1:26 ` Stephen Leake
2004-09-27  7:38 ` Dmitry A. Kazakov
2004-09-27 13:40   ` Larry Hazel
2004-09-27 14:09     ` Dmitry A. Kazakov
2004-09-27  9:45 ` Peter Hermann
2004-09-27 12:51   ` Georg Bauhaus
2004-09-27 13:43     ` Dmitry A. Kazakov
2004-09-27 14:19       ` Georg Bauhaus
2004-09-27 14:48         ` Dmitry A. Kazakov
2004-09-27 17:18           ` Georg Bauhaus
replies disabled

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