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

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!cs.utexas.edu!torn!nott!netfs!news
  3. From: BERRYMAN@orca.drep.dnd.ca (DON BERRYMAN)
  4. Subject: Visibility
  5. Message-ID: <1992Dec23.233519.21523@netfs.dnd.ca>
  6. Sender: news@netfs.dnd.ca (NEWS)
  7. Nntp-Posting-Host: orca.drep.dnd.ca
  8. Organization: Defence Research Establishment Pacific
  9. Date: Wed, 23 Dec 1992 23:35:19 GMT
  10. X-News-Reader: VMS NEWS 1.20
  11. Lines: 47
  12.  
  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.  
  30.      $ ada testviz
  31.          7       function widget (a: integer) return datatypes.widget;
  32.      .........................................................1
  33.      %ADAC-E-NOTDECLALLHIDER, (1) All declarations with designator widget are
  34.              globally hidden by function specification widget at line 7 [LRM 8.3(16)]
  35.      %ADAC-E-ERRPROCESS, Errors compiling package specification testvisibility in
  36.              file FLD$CENTRAL:[BERRYMAN.MFP.MOTIF]TESTVIZ.ADA;4
  37.      %ADAC-E-ENDDIAGS, Ada compilation completed with 1 diagnostic
  38.  
  39.  
  40.  
  41. I can see why this would have happened if I'd coded:
  42.  
  43.      with datatypes; USE DATATYPES;
  44.      package testvisibility is
  45.          function widget (a: integer) return widget;
  46.      end testvisibility;
  47.  
  48.  
  49. But since I have a full specification for DATATYPES.WIDGET
  50. why is there a problem???
  51.  
  52.  
  53. Don Berryman
  54. Defence Research Establishment Pacific
  55. Canadian Forces Base Esquimalt
  56. Victoria, BC, CANADA, V0S-1B0
  57. 604-363-2731    604-363-2856fax
  58. berryman@orca.drep.dnd.ca
  59.  
  60.