From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: enumeration type
Date: Mon, 27 Sep 2004 15:43:55 +0200
Date: 2004-09-27T15:43:55+02:00 [thread overview]
Message-ID: <vo7j6vq7np90.hj8obmhkkc7w.dlg@40tude.net> (raw)
In-Reply-To: cj92cf$gmo$2@a1-hrz.uni-duisburg.de
On Mon, 27 Sep 2004 12:51:27 +0000 (UTC), Georg Bauhaus wrote:
> Peter Hermann <ica2ph@sinus.csv.ica.uni-stuttgart.de> 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
next prev parent reply other threads:[~2004-09-27 13:43 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
2004-09-27 9:45 ` Peter Hermann
2004-09-27 12:51 ` Georg Bauhaus
2004-09-27 13:43 ` Dmitry A. Kazakov [this message]
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