comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland. reston.ans.net!noc.near.net!inmet!spock!stt@ucbvax.Berkeley.EDU  (Tucker Taft)
Subject: Re: Question of Visibility
Date: 7 Jul 93 20:15:33 GMT	[thread overview]
Message-ID: <C9t9Ly.EML@inmet.camb.inmet.com> (raw)

In article <1993Jul2.133624.6485@news.eng.convex.com> 
  pelakh@convex.com (Boris Pelakh) writes:

>In article <1993Jul1.214402.25611@rational.com> 
>  geneo@Rational.COM (Gene Ouye) writes:
>>And 8.4(8):
>>
>>	"The above rules guarantee that a declaration that is made directly
>>	visible by a use clause cannot hide an otherwise directly visible
>>	declaration."
>>
>
>I think this is exactly what I was looking for. Phew !

Your compiler is doing the right thing.  As RM 8.4(5) says:

   A potentially visible declaration is not made directly visible
   if the place considered is within the immediate scope of a homograph
   of the declaration.

Translating that gobble-dy-gook into non-language-lawyer-ease means
that adding a use clause can never hide something that is directly
visible in the absence of use clauses.  The only way to hide something
from package Standard is to declare something of the same name.
"Use"ing a package that declares something of the same name doesn't do it.  

The rules associated with use-visibility 
were designed to minimize maintenance problems,
but they also mean that things made "use" visible have a kind
of second-class visibility, being hidden by anything that is directly
visible in the absence of use visibility.

>>One question: what is preventing you from using dotted notation in the
>>              declaration of flag?  (never mind the obvious question of why
>>              do you need the use clause)
>
>The user has a large body of code interfacing to a FORTRAN library. FORTRAN
>requires .TRUE. = ~.FALSE. in a bit-wise way. They wanted to change the
>meaning of BOOLEAN throughout their entire source by introducing the type
>into one of the root packages, and not having to edit any of the other code.

I would recommend that your user just rename "boolean" to "bool" or 
"f77_bool" or equivalent.  

>Boris Pelakh		Ada Project Leader          pelakh@convex.com
>		     Convex Computer Corporation


S. Tucker Taft    stt@inmet.com
Intermetrics, Inc.
Cambridge, MA  02138

             reply	other threads:[~1993-07-07 20:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-07-07 20:15 Tucker Taft [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-07-08 14:21 Question of Visibility Gene Ouye
1993-07-08 12:17 Wes Groleau X7574
1993-07-07 21:15 Dave Bashford
1993-07-07 21:07 Bor is Pelakh
1993-07-02 14:53 agate!spool.mu.edu!sol.ctr.columbia.edu!The-Star.honeywell.com!cs0.dasd.h
1993-07-02 13:36 Boris Pelakh
1993-07-01 21:44 Gene Ouye
1993-07-01 18:39 Boris Pelakh
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox