comp.lang.ada
 help / color / mirror / Atom feed
From: jakrzy@ss5.magec.com (James A. Krzyzanowski)
Subject: Re: Ada Help
Date: 1995/04/19
Date: 1995-04-19T00:00:00+00:00	[thread overview]
Message-ID: <D7ArDF.I52@ss3.magec.com> (raw)
In-Reply-To: 3mrhq8$2tv@newshost.fiu.edu

alexander m nolasco (anolas01@solix.fiu.edu) wrote:

: I created a generic binary search tree.  I declared BST as limited 
: private.  This generic pack will be implemented in a SET, but I have to 
: have access to BST type...

: I have done the following..

: type SET_TYPE is new T.BST_TYPE --Where T is an instantiation of BST(sp)

: It compiles, but any procedure that uses the OUT mode with will not compile..
: any help!?

From the Language Reference Manual:

paragraph 7.4.4(1)

"A limited type is a type for which neither ASSIGNMENT nor the predefined
comparison for equality and inequality is implicitly declared."

paragraph 7.4.4(4)

"For a formal parameter whose type is limited and whose declararation
occurs in an explicit subprogram declaration, the mode OUT is only allowed
if the type is private...The corresponding full type must not be limited
if the mode OUT is used for any such formal parameter."

What you need to do is use IN OUT and when you assign the "OUT" parameter
you need to define a function or procedure that EXPLICITLY makes that
assignment.

--
Not necessarily the opinion of the company...
--
---------------------------------------------------------------------------
James A. Krzyzanowski - Senior Software Engineer - AFATDS
Magnavox Electronic Systems Company * Fort Wayne, IN 46808 * (219) 429-6446
jakrzy@most.magec.com        Opinions_Expressed := (Mine and not Magnavox);
            "I'd rather be right than politically correct !!!"
---------------------------------------------------------------------------




       reply	other threads:[~1995-04-19  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3mrhq8$2tv@newshost.fiu.edu>
1995-04-19  0:00 ` James A. Krzyzanowski [this message]
1991-01-28  5:13 ADA HELP David Martin
replies disabled

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