TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< 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]>
Subject:
From:
Mark Lundquist <[log in to unmask]>
Content-Transfer-Encoding:
7bit
In-Reply-To:
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

ATOM RSS1 RSS2