comp.lang.ada
 help / color / mirror / Atom feed
From: sal714@rs710.gsfc.nasa.gov (Stephen A. Leake)
Subject: Re: Problem with child package
Date: 03 Mar 1995 18:31:50 GMT
Date: 1995-03-03T18:31:50+00:00	[thread overview]
Message-ID: <SAL714.95Mar3133150@rs710.gsfc.nasa.gov> (raw)
In-Reply-To: jydelr@vub.ac.be's message of 2 Mar 1995 12:39:06 GMT


<discription of carav and voiture packages and child packages>

Remember that there are many scopes in Ada, not just 'local' and
'global. In which package did you declare your 'global' variable? That
package must be visible (via 'with' and possibly 'use') at the point
you want to use the variable.

For example:

package voiture is
	type carav_1 is ...;
end voiture;

package voiture.child is
	type carav is new carav_1 ...;

	global_var : carav;
end voiture.child;

with voiture.child;
procedure access_global_var is
begin
	voiture.child.global_var := ...
end access_global_var;

If your code looks different, post some of it, maybe that will help.

- Stephe
--
Stephen Leake, NASA Goddard Space Flight Center
email: Stephen.Leake@gsfc.nasa.gov



  reply	other threads:[~1995-03-03 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-02 12:39 Problem with child package DELROEUX JEAN-YVES
1995-03-03 18:31 ` Stephen A. Leake [this message]
1995-03-03 22:52 ` Robert Dewar
replies disabled

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