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
Condense Mail Headers

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

Print Reply
Content-Transfer-Encoding:
7bit
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Subject:
From:
Lionel Draghi <[log in to unmask]>
Date:
Sun, 4 Mar 2001 00:20:57 +0100
Content-Type:
text/plain; charset=us-ascii
MIME-Version:
1.0
Reply-To:
Lionel Draghi <[log in to unmask]>
Parts/Attachments:
text/plain (20 lines)
"Taylor, Bill - UK" wrote:
>
> John
>
> You could always look at the value of Control_Data.Month'Valid to check that
> Unchecked_Conversion has yielded a valid value. The attribute was added in
> Ada95 precisely becuase you couldn't rely on compilers to perform a range
> check. If they did, then the Unchecked_Conversion wouldn't be "unchecked".
>
Applying the 'Valid attribute on each record component could be really
tedious : a 'Valid on a record is the solution to get an easy
"Checked_Conversion" generic.
Last time i went on this argument, i had no answer. Provided that 'Valid
apply to each component, it's easy to implement for compilers, or am i
wrong?
The compiler could also easily optimized the check on component that
can't be invalid.

Lionel Draghi.

ATOM RSS1 RSS2