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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,707e18bffca9c9cd X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.74.41 with SMTP id q9mr1675933pav.41.1344318678841; Mon, 06 Aug 2012 22:51:18 -0700 (PDT) Path: g9ni2592998pbo.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!csnews.cs.nctu.edu.tw!news.cs.nctu.edu.tw!feeder.erje.net!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: question on using `with` without `use` and visibility of operators such as '*' Date: Mon, 30 Jul 2012 08:50:22 +0200 Organization: A noiseless patient Spider Message-ID: <87fw89bv4h.fsf@ludovic-brenta.org> References: Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="21ebca96f67dd5c032955613b6f0e87a"; logging-data="6309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QgBn8g1GRn8zjEGhViR+r" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:HMPmfYdWxjFYnEP8s1gzfCPbZG4= sha1:Ll3KQbsW/iWy+Yqbe0r8dbuKw30= Content-Type: text/plain; charset=us-ascii Date: 2012-07-30T08:50:22+02:00 List-Id: Nasser M. Abbasi writes on comp.lang.ada: > This is annoying. It means I have now to `use package_foo` to be able > to write x*y, since "*" is defined in the package. > > Is there a way around this, so I can avoid using `use` but still be > able to just write x * y (may be use something like `use > package_foo("*") at the top if this possible) package P is type T is private; function "*" (Left, Right : in T) return T; end P; wth P; procedure Proc is Foo, Bar : P.T; use type P.T; -- <-- watch this! Baz : constant P.T := Foo * Bar; -- P."*" is now directly visible begin null; end Proc; -- Ludovic Brenta.