comp.lang.ada
 help / color / mirror / Atom feed
From: "Mattimus" <mattisgrat@yahoo.ca>
Subject: Newbie access type help
Date: Tue, 5 Mar 2002 16:31:08 -0500
Date: 2002-03-05T16:31:08-05:00	[thread overview]
Message-ID: <zOah8.26041$X2.271097@nnrp1.uunet.ca> (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;






             reply	other threads:[~2002-03-05 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-05 21:31 Mattimus [this message]
2002-03-06  0:46 ` Newbie access type help Steven Deller
2002-03-06  1:25 ` tmoran
replies disabled

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