home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / ada / 3815 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.5 KB  |  45 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!uw-beaver!pattis
  3. From: pattis@cs.washington.edu (Richard Pattis)
  4. Subject: Re: Visibility
  5. Message-ID: <1992Dec24.021655.22555@beaver.cs.washington.edu>
  6. Sender: news@beaver.cs.washington.edu (USENET News System)
  7. Organization: Computer Science & Engineering, U. of Washington, Seattle
  8. References: <1992Dec23.233519.21523@netfs.dnd.ca>
  9. Date: Thu, 24 Dec 92 02:16:55 GMT
  10. Lines: 33
  11.  
  12. In article <1992Dec23.233519.21523@netfs.dnd.ca> BERRYMAN@orca.drep.dnd.ca (DON BERRYMAN) writes:
  13. >
  14. >
  15. >I have a quesiton on Visiblity. The following Ada code
  16. >generates the following error.
  17. >
  18. >
  19. >     package datatypes is
  20. >         subtype widget is integer;
  21. >     end datatypes;
  22. >
  23. >     with datatypes;
  24. >     package testvisibility is
  25. >         function widget (a: integer) return datatypes.widget;
  26. >     end testvisibility;
  27. >
  28.  
  29. The LRM says in 8.3(16) "every declaration with the same designator" is
  30. hidden. And designators are only identifiers or operator symbols. So it looks
  31. like your designator widget, even when declared in another package and
  32. selected, is still hidden.  There are two notes on this, but both involve
  33. generics
  34.  
  35. Now, can anyone say why this interpretation "is a good thing".
  36.  
  37. Rich Pattis
  38.  
  39.  
  40. -- 
  41. ------------------------------------------------------------------------------
  42.   Richard E. Pattis                     "Programming languages are like
  43.   Department of Computer Science         pizzas - they come in only "too"
  44.     and Engineering                      sizes: too big and too small."
  45.