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-Thread: 103376,cd45439466e86f24 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: enumeration type Date: Mon, 27 Sep 2004 16:09:45 +0200 Message-ID: <1m7c80ttff12n.1k4f3h64rz5f7$.dlg@40tude.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de a9G/Puii4CyPMBL6NMzf8QfWLvIhQPzcihxcr1cBpKQsfPu7s= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:4267 Date: 2004-09-27T16:09:45+02:00 List-Id: 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