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: Matthew Heaney Subject: Re: Enumeration literal visibility and use type Date: 1998/05/26 Message-ID: #1/1 X-Deja-AN: 356888348 References: <6kej65$dnh$1@hermes.seas.smu.edu> <6kejt5$75u@gcsin3.geccs.gecm.com> <6kelnr$ief$1@polo.advicom.net> Organization: Network Intensive Newsgroups: comp.lang.ada Date: 1998-05-26T00:00:00+00:00 List-Id: "David C. Hoos, Sr." writes: > >Despite the obvious error, the "use type" clause is designed to provide > >visibility to the OPERATORS of the type, NOT the type itself so the > >behaviour you are seeing is correct. > > > John is correct. The only way I've found to make the literals visible > (without > a context clause "use doodah;") is in the units requiring visibility is to > declare: > > state_0 : constant doodah.state_value_type := doodah.state_0; > . > . > . > state_etc : constant doodah.state_value_type := doodah.state_etc; > 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. Matt