From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: access types and head pains
Date: Sat, 26 May 2001 04:39:48 GMT
Date: 2001-05-26T04:39:48+00:00 [thread overview]
Message-ID: <3B0F338C.8B16CE09@acm.org> (raw)
In-Reply-To: LkCP6.2414$CT1.433610@news6-win.server.ntlworld.com
"chris.danx" wrote:
>
> package X is
>
> type A is private
> type A_ac is access all A;
> ...
>
> procedure Do_S (av : in out A_ac; v : any_type );
>
> -- with body
> -- is begin
> -- av.v := v; etc
>
> end X;
>
> procedure test is
> at : aliased A;
> begin
> Do_S (at'unchecked_access, 2);
> end test;
>
> i got an error that said "at actual must be a variable". What's wrong?
>
> The idea is that the driver will work with two different kinda things in the
> same procedure. "at" can be declared in program or be a chunk of memory of the
> same size. Any hints?
I suspect your message read "av actual ...". The parameter av is mode in
out, which means Do_S may modify it. You can't change
at'unchecked_access, because then it wouldn't be at'unchecked_access any
more. Unless you have "av := ...;" in Do_S, why not just make it mode
in?
--
Jeff Carter
"I waggle my private parts at your aunties."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2001-05-26 4:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-25 23:59 access types and head pains chris.danx
2001-05-26 4:39 ` Jeffrey Carter [this message]
2001-05-26 16:48 ` chris.danx
2001-05-26 17:17 ` Jeffrey Carter
2001-05-26 17:31 ` chris.danx
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox