TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To: Mark Lundquist <[log in to unmask]>, Greg Bek <[log in to unmask]>
Date: Fri, 16 Feb 2001 11:55:06 -0800
Reply-To: Mark Lundquist <[log in to unmask]>
From: Mark Lundquist <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Parts/Attachments: text/plain (20 lines)
I wrote:

> Note, the implementation is not required to give this result.
> It's perfectly acceptable to get "Valid month" instead.  This
> would happen if the compiler is smart enough to notice that the
> first alternative covers the entire base range of the type (not
> just the range of the subtype, though in this case they are the
> same).  In that case, the compiler can optimize the whole case
> statement away.

That's a little misleading... I didn't mean deleting the case statement in
its entirety, just optimizing it to

        Ada.Text_Io.Put_Line ("Valid month");


Mark Lundquist
Rational Software