home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!walter!obry
- From: obry@flash.bellcore.com (Pascal Obry)
- Subject: Re: SOS find the bug....
- In-Reply-To: houillon@goofi.greco-prog.fr's message of 20 Jan 93 11:03:56 GMT
- Message-ID: <OBRY.93Jan21163808@cycles3.flash.bellcore.com>
- Sender: news@walter.bellcore.com
- Nntp-Posting-Host: cycles3.bellcore.com
- Organization: /u/obry/.organization
- References: <1993Jan20.110356.23223@greco-prog.fr>
- Date: 21 Jan 93 16:38:08
- Lines: 58
-
-
- Christian,
-
- Like you have noticed, it's only a problem of visibility.
-
- You make the generic package visible into the package PACK1.
-
- by a : use PACK3_INST;
-
- But you didn't into the package body PACK1.
-
- (see LRM 8.4 about use clause and the visibility)
-
-
- > package body PACK3 is
- >
- > procedure PROC3 ( In_Record3 : in RECORD3 ) is
-
- *** Here RECORD3 is visible since it is inside the package
-
- > begin
- > null ;
- > end PROC3 ;
- >
- > end PACK3 ;
- >
- >-- if I don't use the expression
- >-- procedure PROC2 ( In_Record2: in RECORD2 ;
- >-- In_Record3: in PACK3_INST.RECORD3 ) is
- >-- I get a compilation error message (see below)
- >--
- >
-
- *** Since PROC2 is outside the PACK3 ...
- *** you should add : use PACK3_INST;
- *** to have the visibility of RECORD3
-
- > procedure PROC2 ( In_Record2: in RECORD2 ;
- > In_Record3: in RECORD3 ) is
- > begin
- > null ;
- > end PROC2 ;
-
-
- Hope this help,
- Pascal.
- --
-
- -------------------------------------------------------------------------------
- -- Pascal OBRY --
- -- Room 2D-337 e_mail : obry@bellcore.com --
- -- Bellcore --
- -- 445 South Street voice : 1 - 201 829 4039 --
- -- Post Office Box 1910 FAX : 1 - 201 829 5981 --
- -- Morristown, New Jersey 07962-1910 --
- -------------------------------------------------------------------------------
-
- `` inheritance is surely a good answer, but who knows the question ? ''
-