comp.lang.ada
 help / color / mirror / Atom feed
From: Jeff Carter <spam.carter.not@spam.innocon.com>
Subject: Re: Ada 83 Pointers question
Date: 1999/01/21
Date: 1999-01-21T00:00:00+00:00	[thread overview]
Message-ID: <36A741BA.E500BC6D@spam.innocon.com> (raw)
In-Reply-To: 36A658CA.97438B6@cacd.rockwell.com

"Lowe Anthony A" asked about using Unchecked_Conversion to obtain an
access value to a component of a record that is a component of an array.

It is true that an Ada-83 access value cannot refer to anything except
the result of "new" under normal circumstances. However, unchecked
features of the language explicitly bypass the normal checks of the
language and let you do things that might be dangerous, including this.

It is perfectly legal Ada 83 to instantiate Unchecked_Conversion to
convert from System.Address to an access type. If the result designates
the value you want it to, then this should work fine for you. However,
such an approach is entirely compiler dependent. This may not bother
you, since you are maintaining the compiler.

I cannot tell what is causing your constant array declaration to fail to
elaborate without more specific information. The use of
Unchecked_Conversion does not sound as if it is causing this, however.

-- 
Jeff Carter
E-mail: carter commercial-at innocon [period | full stop] com
"We call your door-opening request a silly thing."
Monty Python & the Holy Grail




  reply	other threads:[~1999-01-21  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-20  0:00 Ada 83 Pointers question Lowe Anthony A
1999-01-21  0:00 ` Jeff Carter [this message]
1999-01-21  0:00   ` Matthew Heaney
1999-01-21  0:00 ` dennison
1999-01-21  0:00 ` robert_dewar
1999-01-21  0:00   ` dennison
replies disabled

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