From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.36.51.141 with SMTP id k135mr6144228itk.19.1516842559616; Wed, 24 Jan 2018 17:09:19 -0800 (PST) X-Received: by 10.157.1.22 with SMTP id 22mr769069otu.0.1516842559538; Wed, 24 Jan 2018 17:09:19 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no321168ita.0!news-out.google.com!s63ni4533itb.0!nntp.google.com!g80no320613itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 24 Jan 2018 17:09:19 -0800 (PST) In-Reply-To: <21d0a0b8-8c66-42fb-9d4a-dc9dbbc33521@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:7466:f44c:da21:40b1; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:7466:f44c:da21:40b1 References: <3d796e5f-015e-469c-bbcb-edc3303793ab@googlegroups.com> <21d0a0b8-8c66-42fb-9d4a-dc9dbbc33521@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0829e4c2-ea35-4a87-b5b4-330093ac739c@googlegroups.com> Subject: Re: no + or - defined for fixed point types in Standard, why ? From: Robert Eachus Injection-Date: Thu, 25 Jan 2018 01:09:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 3876142394 X-Received-Bytes: 3028 Xref: reader02.eternal-september.org comp.lang.ada:50128 Date: 2018-01-24T17:09:19-08:00 List-Id: On Wednesday, January 24, 2018 at 1:36:59 PM UTC-5, Mehdi Saada wrote: > I don't understand. To me either it's visible, either it's not...=20 In Ada declarations are directly visible if they are declared in the curren= t scope, or an enclosing scope. Declarations are use visible if they are o= nly visible due to a use clause. A directly visible declaration hides any use visible declarations. However= , you can (almost always) use a qualified name to reference something which= is use visible i.e. Ada.Text_IO.Put if there is another put declared local= ly that hides it. About the almost always? Don't do that! The examples I used in testing al= most always included a package Standard as a library unit... >=20 > Even with the conversion method, the warning about overridding won't go a= way. Eventhough there's no explicit call on Standard anymore. >=20 > > You are trying to do something wonky, and the compiler is telling you t= hat. > I could tell before trying ;-) As I said, you can turn off warnings if it bothers you. I think if you loo= k through the GNAT sources, there are a number of places where they do that= . As a programming practice, I like it. It says that the programmer knows= that the compiler won't like this, but I want to do it anyway. A perfect example is a test to insure that a compiler raises Program_Error = if a function "runs off the end" which is fine for procedures. function Test is begin if false then return; end if; end Test; See what your compiler says about that.