* Newbie access type help
@ 2002-03-05 21:31 Mattimus
2002-03-06 0:46 ` Steven Deller
2002-03-06 1:25 ` tmoran
0 siblings, 2 replies; 3+ messages in thread
From: Mattimus @ 2002-03-05 21:31 UTC (permalink / raw)
Hi Gurus,
I just started using Ada and am having some troubles with access types.
I have posted my very simple code below hoping someonce can help me. The
problem I am having occurs when trying to use the 'Access attribute of an
object. The compiler I am using is Apex NT, the error I am given is "Saw ' ,
expected OPERATOR". Can someone please point out where I am going wrong?
Please keep in mind when viewing the code sample that Nav is a package
defined elsewhere.
Thanks a bunch,
Matt
package Dispnavinterface is
type Nav_Ptr is access all Nav;
type Navinterface is
record
Navobject : aliased Nav;
Pos_Func_Ptr : Displays.Int_Func_Ptr;
end record;
Atempnav : Nav_Ptr;
end Dispnavinterface
--procedures
procedure Initialize
(Aninterface : in out Navinterface; Anav : Nav);
procedure Initialize
(Aninterface : in out Navinterface; Anav : Nav) is
begin
Aninterface.Navobject := Anav;
Aninterface.Pos_Func_Ptr := Return_Position;
Atempnav := (Aninterface.Navobject)'Access; <<-- THIS GIVES AN
ERROR
end Initialize;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-03-06 1:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-05 21:31 Newbie access type help Mattimus
2002-03-06 0:46 ` Steven Deller
2002-03-06 1:25 ` tmoran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox