home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / ada / 2481 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.3 KB

  1. From: stt@spock.camb.inmet.com
  2. Date: 28 Aug 1992 21:43 EDT
  3. Newsgroups: comp.lang.ada
  4. Subject: Re: Ada9X generic formal packages
  5. Message-ID: <20600140@spock>
  6. Path: sparky!uunet!noc.near.net!inmet!inmet!spock!stt
  7. Nf-ID: #R:ut-emx.uucp:78322:spock:20600140:000:997
  8. Nf-From: spock.camb.inmet.com!stt    Aug 28 21:43:00 1992
  9. References: <78322@ut-emx.uucp>
  10. Lines: 39
  11.  
  12.  
  13.  
  14. In article <78322@ut-emx.uucp> 
  15.   hasan@emx.cc.utexas.edu (David A. Hasan) writes:
  16.  
  17. >I have a question regarding the use of generic formal
  18. >packages in Ada9X.
  19. >
  20. >Suppose that there already exists a package <g1> in the
  21. >library and that I want to "include" this generic package
  22. >in the list of generic formals for a second generic package,
  23. ><g2>:
  24. >
  25. >     GENERIC
  26. >       ...
  27. >       WITH PACKAGE p1 IS NEW g1(<>);
  28. >     PACKAGE g2 IS
  29. >       ...
  30. >     END g2;
  31. >
  32. >My question is this:
  33. >
  34. >Do I have to provide a "WITH g1;" in the context clause
  35. >for <g2>? 
  36.  
  37. Yes.  The name of another library unit is never visible unless
  38. it is "with"ed.  By the way, it wouldn't surprise me if
  39. an example in the Ada 9X Mapping Rationale left off such a "with"
  40. clause.
  41.  
  42. >--| David A. Hasan   University of Texas at Austin
  43. >--|                  Center for Space Research
  44. >--|                  hasan@emx.cc.utexas.edu
  45.  
  46. S. Tucker Taft   stt@inmet.com
  47. Ada 9X Mapping/Revision Team
  48. Intermetrics, Inc.
  49. Cambridge, MA  02138
  50.  
  51.