From: John McCabe <jgm@hayling.cwmbran.gecm.com>
Subject: Re: Enumeration literal visibility and use type
Date: 1998/05/27
Date: 1998-05-27T00:00:00+00:00 [thread overview]
Message-ID: <6kghrk$92n@gcsin3.geccs.gecm.com> (raw)
In-Reply-To: m3af848xd6.fsf@mheaney.ni.net
Matthew Heaney <matthew_heaney@acm.org> wrote:
>> Anyone have a better way?
>
>
>Yes. Do a use immediately after declaring the object:
>
>declare
> State : Doodah.State_Value_Type;
> use Doodah;
>begin
> <literals are now directly visible>
> 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
<john@nospam.assen.demon.co.uk>
=====================================================================
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)
=====================================================================
next prev parent reply other threads:[~1998-05-27 0:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-26 0:00 Enumeration literal visibility and use type William Bralick
1998-05-26 0:00 ` John McCabe
1998-05-26 0:00 ` David C. Hoos, Sr.
1998-05-26 0:00 ` John English
1998-05-26 0:00 ` Ray Blaak
1998-05-27 0:00 ` John McCabe
1998-05-27 0:00 ` John McCabe
1998-05-26 0:00 ` Matthew Heaney
1998-05-27 0:00 ` John McCabe [this message]
1998-05-27 0:00 ` Robert Dewar
1998-05-27 0:00 ` Matthew Heaney
1998-05-26 0:00 ` Roger Racine
1998-05-26 0:00 ` Matthew Heaney
1998-05-27 0:00 ` John McCabe
1998-05-27 0:00 ` William Bralick
1998-05-27 0:00 ` Mats Weber
[not found] <6kej65$dnh$1@hermes.seas.smu.edu| <6kejt5$75u@gcsin3.geccs.gecm.com>
1998-05-26 0:00 ` William Bralick
1998-05-26 0:00 ` Fergus Henderson
1998-05-27 0:00 ` William Bralick
1998-05-27 0:00 ` John McCabe
1998-05-27 0:00 ` Peter Amey
1998-05-27 0:00 ` John McCabe
1998-05-27 0:00 ` Robert Dewar
1998-05-28 0:00 ` John McCabe
1998-05-28 0:00 ` Robert Dewar
1998-05-29 0:00 ` John McCabe
1998-05-28 0:00 ` Thomas Hood
1998-05-28 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox