From: "ldries46" <bertus.dries@planet.nl>
Subject: Re: acceess problem
Date: Mon, 25 Jul 2011 11:59:31 +0200
Date: 2011-07-25T11:59:31+02:00 [thread overview]
Message-ID: <4e2d3e9e$0$2559$703f8584@news.kpn.nl> (raw)
In-Reply-To: <m24o2azrwb.fsf@pushface.org>
Thanks this was the solution to get the compiler accepting the construction.
L. Dries
"Simon Wright" schreef in bericht news:m24o2azrwb.fsf@pushface.org...
"ldries46" <bertus.dries@planet.nl> writes:
> I have done what you suggested and got the following error message on
> the line
> Axis1Amb : array (0 .. 3) of aliased GLfloat := (AxL, 0.0, 0.0, 1.0);
>
> non-local pointer cannot point to local object
I should have tried it, sorry.
Replace 'Access with 'Unchecked_Access or, if that doesn't work, with
the (GNAT-special) 'Unrestricted_Access.
Later:
I did try it, with these two:
package Floats is
type P is access all Float;
end Floats;
with Floats;
package Aliased_Stuff is
A : array (0 .. 3) of aliased Float := (42.0, 0.0, 0.0, 1.0);
P : Floats.P := A (0)'Access;
end Aliased_Stuff;
and the compiler (GNAT GPL 2011) was quite happy.
next prev parent reply other threads:[~2011-07-25 9:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-24 15:59 acceess problem ldries46
2011-07-24 17:27 ` Simon Wright
2011-07-25 6:57 ` ldries46
2011-07-25 8:27 ` Simon Wright
2011-07-25 9:59 ` ldries46 [this message]
2011-07-26 15:57 ` Gautier write-only
2011-07-26 17:43 ` Adam Beneschan
2011-07-27 12:06 ` Gautier write-only
2011-07-25 9:08 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox