comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: enumeration type
Date: Mon, 27 Sep 2004 16:09:45 +0200
Date: 2004-09-27T16:09:45+02:00	[thread overview]
Message-ID: <1m7c80ttff12n.1k4f3h64rz5f7$.dlg@40tude.net> (raw)
In-Reply-To: RNU5d.143$Xc6.4551@eagle.america.net

On Mon, 27 Sep 2004 08:40:29 -0500, Larry Hazel wrote:

> Dmitry A. Kazakov wrote:
>> On Mon, 27 Sep 2004 02:13:27 +0200, Rick Santa-Cruz wrote:
>> 
>>>I have defined a new type in my program:
>>>type Boolean is (True, Maybe, False);
>>>
>>>Now I wanna use the standard type, that means Standard.Boolean.
>>>How can I now access the True-element from the original Standard.Boolean
>>>type? For example if I want to write something like:
>>>X : Standard.Boolean;
>>>
>>>if X = Standard.Boolean.True then
>> 
>> if X then -- (:-))
>> 
>> BTW, the type you define is technically not Boolean. It is better to call
>> it Logical or Three_State_Logical.
>> 
> How about Illogical :)

Hey, it is a decent mathematical theory! (:-))

It becomes really nasty with fuzzy logic. In my fuzzy sets implementation
truth levels are fixed point:

Confidence_Size : constant := 8; -- One byte per value
type Confidence is delta 2.0 ** (-Confidence_Size) range 0.0..1.0;
for Confidence'Size use Confidence_Size;

Alas, though as expected, 1.0 /= Confidence'Last!

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2004-09-27 14:09 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
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 [this message]
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