TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Mark Lundquist <[log in to unmask]>
Fri, 16 Feb 2001 11:55:06 -0800
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