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,4ee5611d3fbf05b7 X-Google-Attributes: gid103376,public From: John McCabe Subject: Re: Enumeration literal visibility and use type Date: 1998/05/27 Message-ID: <6kghrk$92n@gcsin3.geccs.gecm.com>#1/1 X-Deja-AN: 356917186 Content-Transfer-Encoding: 7bit References: <6kej65$dnh$1@hermes.seas.smu.edu> <6kejt5$75u@gcsin3.geccs.gecm.com> <6kelnr$ief$1@polo.advicom.net> Content-Type: text/plain; charset=us-ascii Organization: GMS&T Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-05-27T00:00:00+00:00 List-Id: Matthew Heaney wrote: >> Anyone have a better way? > > >Yes. Do a use immediately after declaring the object: > >declare > State : Doodah.State_Value_Type; > use Doodah; >begin > > State := State_0; >end; > >The idea is that you want to be able to trace an entity back to the >source. Since you've stated explicitly that State_Value_Type is >declared in Doodah, there is high probability that State_0 is declared >there too. But here you are still bringing far more than State_Value_Type and its operators into scope in the block which is what William is trying to avoid. If the block was simple then that could be a way to do it, and I have done it myself that way before. But if it is complicated, the declare section could easily get lost in the noise in a printout, leaving it only very slightly clearer than "use"ing doodah at the outer level. -- Best Regards John McCabe ===================================================================== Any opinions expressed are mine and based on my own experience. They should in no way be taken as the opinion of anyone I am currently working with, or of the company I am currently working for. If you have a problem with anything I say, SPEAK TO ME! (remove "nospam." to reply by e-mail) =====================================================================