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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c2f62556e56c9683 X-Google-Attributes: gid103376,public From: xl@home.com Subject: Re: 'with'ing and 'use'ing Date: 2000/02/29 Message-ID: <38BC11AB.3733FF5A@home.com>#1/1 X-Deja-AN: 591405395 Content-Transfer-Encoding: 7bit References: X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@home.net X-Trace: news1.sttls1.wa.home.com 951849372 24.0.225.174 (Tue, 29 Feb 2000 10:36:12 PST) Organization: @Home Network MIME-Version: 1.0 NNTP-Posting-Date: Tue, 29 Feb 2000 10:36:12 PST Newsgroups: comp.lang.ada Date: 2000-02-29T00:00:00+00:00 List-Id: Actually, the idea of not "Use"ing packages is quite common. But you are right, the effect of not pulling in the operators for defined types can get a bit irritating. My project saw this early on and allows the use of the "use type xxxx;" statement to circumvent the need for the functional notation use of operators such as ">=" etc... The 'use type' statement has the effect of providing visibility to all operations on the type specified without haveing to resort to a general use clause on the entire package surrounding the type in question. Quite handy and much more readable. Robert Roger Hoyle wrote: > > Hi, > > I'm just trying to clear something up in my head. > > I'm trying to interface with a lot [a *lot* :] of Ada95 code and the rest > of the code has a policy of not 'use'ing other packages, just 'with'ing > them to force the full names of types & functions etc. As a result, I'm > adopting the same attitude. > > 1) Is this basically a good idea? It seems sensible to me, but then I know > little about Ada. (I'm asking about generally not 'use'ing stuff, not > specifically my current situation) > > 2) One of the packages defines a sub-package called Ops, which contains > the operators (=,/=,>=,<=) etc for some of the types in the main > package. The only way I seem to be able to get access to these operators > is to 'use' the package. Is this right, or am I missing somehting? > > Any help gratefully received. > > Thanks > > rog.