From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86ec22e070e319c0 X-Google-Attributes: gid103376,public From: Simon Wright Subject: Re: How do I get this to work?? Date: 1999/01/06 Message-ID: #1/1 X-Deja-AN: 429552614 X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 References: <76s0dp$1v4$1@nntp3.uunet.ca> <76tbvv$ba5$1@nntp3.uunet.ca> X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 915657971 nnrp-10:27660 NO-IDENT pogner.demon.co.uk:158.152.70.98 Organization: At Home Newsgroups: comp.lang.ada Date: 1999-01-06T00:00:00+00:00 List-Id: "Chris Warwick" writes: > Sorry, perhaps I should have been a little more specific... > > Chris Warwick wrote in message <76s0dp$1v4$1@nntp3.uunet.ca>... > > package Ada_Front_End is > > > > type Session_Type is > > record > > Status : integer := 0; > > end record; > > > > type Session_Ptr_Type is access Session_Type; > > > > function Close_Port (Session : in Session_Ptr_Type) return integer; > > end Ada_Front_End; > > > > procedure Close_Connection is > > Session : aliased constant Ada_Front_End.Session_Type; I guess there must be more to this than you are showing us, because as it stands this Session comes into being here and has no initialization visible .. so it's not clear what the meaning could be (never mind whether it will compile) > > Session_Ptr : Session_Ptr_Type := Session'Access; > > It barfs here, because Session_Ptr_Type has greater scope than Session. My > problem is Close_Port needs a pointer to a Session, so I have to define the > Session_Ptr_Type at the highest level... > > > begin > > Ada_Front_End.Close_Port > > (Session => Session_Ptr); What about (Session => Session'Access) ? (I expect it will fail just the same, and anyway as I said earlier you need to fix this function/procedure thing here)) > > end Close_Connection;