comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcqada@earthlink.net>
Subject: Re: Unchecked_Conversion
Date: Thu, 07 Jun 2001 13:01:23 GMT
Date: 2001-06-07T13:01:23+00:00	[thread overview]
Message-ID: <3B1F6E47.617722A2@earthlink.net> (raw)
In-Reply-To: 9fnbtt$ild$1@e3k.asi.ansaldo.it

Lele wrote:
> 
> Hi!
> I'm a misterious reader...just because I've read for a month this NG without
> take part.
> I'm a beginner ADA programmer (what a wonderful language!) and I've a
> problem...
> 
> I should convert data types and record data types from one type to another,
> since now I've
> used the address attribute to point the same memory space and so accede to
> from one type
> to another. Ada provides features for bypassing certain language
> restrictions and these
> features are unchecked; it is the programmer's responsibility to make sure
> that they do
> not violate the assumptions of the rest of the program. Are there particular
> risks about using Unchecked_Conversion? Is it a better approach  the address
> attribute?
> 
> Thanks!

Unchecked_Conversion is almost always a better approach than using the
'Address attribute.  However, the need to do a significant amount of
converting from one type to another suggests that perhaps a second look
at the implementation approach is warranted.

Forcing conversions between types is usually appropriate only in certain
very specific domains, such as interfacing to operating system
functions.  The great majority of software written in Ada contains no
such conversions.

What kind of software are you writing?

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



  parent reply	other threads:[~2001-06-07 13:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-07  7:46 Unchecked_Conversion Lele
2001-06-07 12:50 ` Why not try Checked_Conversion? Petter Fryklund
2001-06-07 13:01 ` Marc A. Criley [this message]
2001-06-07 13:21 ` Unchecked_Conversion Ted Dennison
2001-06-10 18:20   ` Unchecked_Conversion Robert B. Love 
2001-06-10 19:48     ` Unchecked_Conversion Jeff Creem
2001-06-10 22:10     ` Unchecked_Conversion Keith Thompson
2001-06-11 13:56     ` Unchecked_Conversion Ted Dennison
2001-06-11 14:21     ` Unchecked_Conversion Marin David Condic
2001-06-07 14:01 ` Unchecked_Conversion Jacob Sparre Andersen
2001-06-07 19:44 ` Unchecked_Conversion tmoran
2001-06-09 17:07   ` Unchecked_Conversion Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1992-01-02  6:09 unchecked conversion Robert I. Eachus
1991-12-31 13:53 Jean-Pierre Rosen
1991-12-30 23:25 Greg Lomow
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox