home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!cs.utexas.edu!torn!nott!netfs!news
- From: BERRYMAN@orca.drep.dnd.ca (DON BERRYMAN)
- Subject: Visibility
- Message-ID: <1992Dec23.233519.21523@netfs.dnd.ca>
- Sender: news@netfs.dnd.ca (NEWS)
- Nntp-Posting-Host: orca.drep.dnd.ca
- Organization: Defence Research Establishment Pacific
- Date: Wed, 23 Dec 1992 23:35:19 GMT
- X-News-Reader: VMS NEWS 1.20
- Lines: 47
-
-
-
- I have a quesiton on Visiblity. The following Ada code
- generates the following error.
-
-
- package datatypes is
- subtype widget is integer;
- end datatypes;
-
- with datatypes;
- package testvisibility is
- function widget (a: integer) return datatypes.widget;
- end testvisibility;
-
-
-
- $ ada testviz
- 7 function widget (a: integer) return datatypes.widget;
- .........................................................1
- %ADAC-E-NOTDECLALLHIDER, (1) All declarations with designator widget are
- globally hidden by function specification widget at line 7 [LRM 8.3(16)]
- %ADAC-E-ERRPROCESS, Errors compiling package specification testvisibility in
- file FLD$CENTRAL:[BERRYMAN.MFP.MOTIF]TESTVIZ.ADA;4
- %ADAC-E-ENDDIAGS, Ada compilation completed with 1 diagnostic
-
-
-
- I can see why this would have happened if I'd coded:
-
- with datatypes; USE DATATYPES;
- package testvisibility is
- function widget (a: integer) return widget;
- end testvisibility;
-
-
- But since I have a full specification for DATATYPES.WIDGET
- why is there a problem???
-
-
- Don Berryman
- Defence Research Establishment Pacific
- Canadian Forces Base Esquimalt
- Victoria, BC, CANADA, V0S-1B0
- 604-363-2731 604-363-2856fax
- berryman@orca.drep.dnd.ca
-
-