TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Content-Transfer-Encoding: 7bit
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
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
The compiler could also easily optimized the check on component that
can't be invalid.

Lionel Draghi.