comp.lang.ada
 help / color / mirror / Atom feed
* access types and head pains
@ 2001-05-25 23:59 chris.danx
  2001-05-26  4:39 ` Jeffrey Carter
  0 siblings, 1 reply; 5+ messages in thread
From: chris.danx @ 2001-05-25 23:59 UTC (permalink / raw)


hi,
    I have the following situation.  I'm writing a driver that can be run on my
system.  I want to test it by writing virtually to a file.


The problem is i had the following code


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?


Thanks,
Chris





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-05-26 17:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-25 23:59 access types and head pains chris.danx
2001-05-26  4:39 ` Jeffrey Carter
2001-05-26 16:48   ` chris.danx
2001-05-26 17:17     ` Jeffrey Carter
2001-05-26 17:31       ` chris.danx

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