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: Brian Rogoff Subject: Re: How do I get this to work?? Date: 1999/01/09 Message-ID: #1/1 X-Deja-AN: 430650048 References: <76s0dp$1v4$1@nntp3.uunet.ca> <76tbvv$ba5$1@nntp3.uunet.ca> <770ifd$qui$1@goblin.uunet.ca> <771bl9$sla$1@nnrp1.dejanews.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 915914989 19104 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-01-09T00:00:00+00:00 List-Id: On Sat, 9 Jan 1999, Chris Warwick wrote: > In article <771bl9$sla$1@nnrp1.dejanews.com>, robert_dewar@my-dejanews.com wrote: > > >You can't have it both ways, If you insist on structuring > >your program in a manner that leaves it open to the > >possibilities of dangling pointers, then you have to use > >Unchecked_Access. > > I guess this where I get confused. If I want to pass a pointer amoungst these > functions/procedures I have to define the type at the package level. As a > result there is no way for someone to define an instance of the pointer at a > lower level, i.e., as a local variable within a procedure. Another way to get I'm jumping into the middle of this, so I don't have the context, but one trick I use to define access types at a lower level is to define the access types in a generic package and instantiate them in the scope that I need them. This trick is especially useful with access to subprogram types, which don't permit an Unchecked_Access. > I've got it working... My uneasyness stems from the fact that when I ran into > unchecked_conversion I was able to get someone to explain to me how it really > was "supposed" to work, and once I understood, I agreed. Thus far I still do > not understand how a package can export a "useful" pointer definition... By making the package (a parameterless, if necessary) generic, and instantiating it where you need it? -- Brian