home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / ada / 4030 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.9 KB  |  72 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!walter!obry
  3. From: obry@flash.bellcore.com (Pascal Obry)
  4. Subject: Re: SOS find the bug....
  5. In-Reply-To: houillon@goofi.greco-prog.fr's message of 20 Jan 93 11:03:56 GMT
  6. Message-ID: <OBRY.93Jan21163808@cycles3.flash.bellcore.com>
  7. Sender: news@walter.bellcore.com
  8. Nntp-Posting-Host: cycles3.bellcore.com
  9. Organization: /u/obry/.organization
  10. References: <1993Jan20.110356.23223@greco-prog.fr>
  11. Date: 21 Jan 93 16:38:08
  12. Lines: 58
  13.  
  14.  
  15. Christian,
  16.  
  17. Like you have noticed, it's only a problem of visibility.
  18.  
  19. You make the generic package visible into the package PACK1.
  20.  
  21.     by a : use PACK3_INST;
  22.  
  23. But you didn't into the package body PACK1.
  24.  
  25. (see LRM 8.4 about use clause and the visibility)
  26.  
  27.  
  28. >        package body PACK3 is 
  29. >
  30. >        procedure PROC3 ( In_Record3 : in RECORD3 ) is
  31.  
  32.   *** Here RECORD3 is visible since it is inside the package 
  33.  
  34. >        begin
  35. >            null ;
  36. >            end PROC3 ;
  37. >
  38. >        end PACK3 ;
  39. >
  40. >-- if I don't use the expression
  41. >--     procedure PROC2 ( In_Record2: in RECORD2 ;
  42. >--                         In_Record3: in PACK3_INST.RECORD3 ) is
  43. >-- I get a compilation error message (see below)
  44. >--
  45. >
  46.  
  47.    *** Since PROC2 is outside the PACK3 ...
  48.    *** you should add : use PACK3_INST;
  49.    *** to have the visibility of RECORD3
  50.  
  51. >        procedure PROC2 ( In_Record2: in RECORD2 ;
  52. >                          In_Record3: in RECORD3 ) is
  53. >    begin
  54. >        null ;
  55. >    end PROC2 ;
  56.  
  57.  
  58. Hope this help,
  59. Pascal.
  60. --
  61.  
  62. -------------------------------------------------------------------------------
  63. --  Pascal OBRY                                     --
  64. --  Room 2D-337                e_mail : obry@bellcore.com           --
  65. --  Bellcore                                     --
  66. --  445 South Street            voice : 1 - 201 829 4039         --
  67. --  Post Office Box 1910        FAX   : 1 - 201 829 5981         --
  68. --  Morristown, New Jersey 07962-1910                         --
  69. -------------------------------------------------------------------------------
  70.  
  71.   `` inheritance is surely a good answer, but who knows the question ? ''
  72.