comp.lang.ada
 help / color / mirror / Atom feed
From: matthew_heaney@acm.org (Matthew Heaney)
Subject: Re: need code improvment
Date: 1998/05/19
Date: 1998-05-19T00:00:00+00:00	[thread overview]
Message-ID: <matthew_heaney-ya023680001905982309300001@news.ni.net> (raw)
In-Reply-To: 35607DFE.59B@ipnsun5.in2p3.fr


In article <35607DFE.59B@ipnsun5.in2p3.fr>, grave <grave@ipnsun5.in2p3.fr>
wrote:

(start of quote)
function Adresse_Tableau is new Ada.Unchecked_Conversion
(Integer,System.Address);

Tableau1 : Vecteur1;
for Tableau1'Address use Adresse_Tableau(16#12_2a8_000#);

Did someone can advice me for a better code ?
(i.e avoiding unchecked conversion)
(end of quote)

Ada comes with a predefined operation to convert between type Integer and
Address:

System.Storage_Elements.To_Address.

No use of Unchecked_Conversion is required.

(start of quote)
Thanks in advance,

Xavier Grave
(end of quote)

De rien.

Matt




      parent reply	other threads:[~1998-05-19  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-18  0:00 need code improvment grave
1998-05-18  0:00 ` Steve Doiel
1998-05-19  0:00 ` Matthew Heaney [this message]
replies disabled

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