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 15:43:55 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de odkFHJswMcDGmVJVuFFthgLpJpyjIdR9Kr8J5uswHQvG5YkdI= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:4262 Date: 2004-09-27T15:43:55+02:00 List-Id: On Mon, 27 Sep 2004 12:51:27 +0000 (UTC), Georg Bauhaus wrote: > Peter Hermann wrote: > >: type fuzzy is (false,true,maybe); >: >: and now a final joke: >: >:> if X = Standard.Boolean.True then >: >: (-: if x then :-) > > :) > > If you don't dislike writing down what you want to say, > you can use qualified notation: > > procedure p is > type Ternary_Logical is (True, Maybe, False); > v: Ternary_Logical; > b: Boolean; > begin > if b = Boolean'(True) and v = Ternary_Logical'(True) then > null; > end if; > end p; What for? Either if b = True and v = True then ... or if b and v = True then ... is unambiguous. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de