comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve" <nospam_steved94@attbi.com>
Subject: Re: Newbie question about pointers in GNAT 3.15p on Windows 2000
Date: Sat, 22 Feb 2003 15:31:49 GMT
Date: 2003-02-22T15:31:49+00:00	[thread overview]
Message-ID: <FJM5a.215628$vm2.161767@rwcrnsc54> (raw)
In-Reply-To: 816517EFDE1ABFFF.672EFD9C99861B55.1999743ACE4BA64B@lp.airnews.net

Using an acceess variable to reference a local variable is inherently risky
since the memory being accessed is only valid for the lifetime of the
procedure or function in which the variable is declared.  For this reason
using the 'Access attribute is restricted for these variables.

If you are absolutely certain the variable will not be referenced after the
lifetime of the procedure or function in which it is declared, you may use
'Unchecked_Access to specifically get around this restriction.  Using
'Unchecked_Access is a way of saying "I know what I'm doing is risky, but I
want to do it anyway".

I hope this helps,
Steve
(The Duck)





  parent reply	other threads:[~2003-02-22 15:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-21 21:20 Newbie question about pointers in GNAT 3.15p on Windows 2000 David Gressett
2003-02-21 23:03 ` David C. Hoos, Sr.
2003-02-24 19:05   ` David Gressett
2003-02-24 19:25     ` David Gressett
2003-02-22 15:31 ` Steve [this message]
2003-02-24  6:40   ` Newbie question about pointers in GNAT 3.15p on Windows 2000 : to Steve prashna
2003-02-25  2:57     ` Steve
replies disabled

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