comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: extended membership tests
Date: Fri, 1 Apr 2011 20:22:21 -0500
Date: 2011-04-01T20:22:21-05:00	[thread overview]
Message-ID: <in5toh$uvj$1@munin.nbi.dk> (raw)
In-Reply-To: 0a58c4e0-f4b5-4cab-8aa7-7ab39337664e@p13g2000yqh.googlegroups.com

"AdaMagica" <christ-usch.grein@t-online.de> wrote in message 
news:0a58c4e0-f4b5-4cab-8aa7-7ab39337664e@p13g2000yqh.googlegroups.com...
...
>I do not see why we need choice_expression and choice_relation RM
>4.4(2.1/3,2.2/3).
>Wouldn't simple_expression suffice in (3.2/3)?

It exists so that the incompatibility with case statements is limited only 
to memberships. Without the choice_expression syntax,

    when A and 16#0100# =>

would be syntactically illegal. No one cares about Boolean case statements, 
but in this example A is a modular value, and it makes at least some sense 
to write this. As such we worried that it might actually exist in code (it's 
a common idiom in code that intefaces to Win32, for one example), and since 
the fix is relatively easy (a bit of additional syntax), we added the extra 
syntax. It's discussed in the e-mail filed in AI05-0158-1 (but not in the 
body of the AI itself).

                               Randy.






      parent reply	other threads:[~2011-04-02  1:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31  7:04 extended membership tests Dan
2011-03-31  7:34 ` AdaMagica
2011-03-31  7:55   ` Dan
2011-03-31  7:58     ` Dan
2011-03-31  8:05 ` Ludovic Brenta
2011-03-31  9:28 ` AdaMagica
2011-03-31 14:33 ` Robert A Duff
2011-03-31 16:28   ` extended membership tests (branch) Georg Bauhaus
2011-03-31 17:58     ` Robert A Duff
2011-03-31 18:54     ` Adam Beneschan
2011-03-31 21:08       ` Georg Bauhaus
2011-03-31 21:10       ` Randy Brukardt
2011-04-01  5:14   ` extended membership tests AdaMagica
2011-04-01  6:33     ` Dan
2011-04-01  7:03       ` AdaMagica
2011-04-01  9:56         ` stefan-lucks
2011-04-01 15:11         ` Adam Beneschan
2011-04-02  1:22         ` Randy Brukardt [this message]
replies disabled

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