TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

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

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

Print Reply
Subject:
From:
Mark Lundquist <[log in to unmask]>
Reply To:
Mark Lundquist <[log in to unmask]>
Date:
Fri, 16 Feb 2001 11:55:06 -0800
Content-Type:
text/plain
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