From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Use of use, was Re: Gtkada-Prob
Date: 27 Nov 2001 09:06:32 -0500
Date: 2001-11-27T14:09:06+00:00 [thread overview]
Message-ID: <uhergjok7.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: SnGM7.25$8b3.4565@read2.inet.fi
"Anders Wirzenius" <anders.wirzenius@pp.qnet.fi> writes:
> Preben Randhol wrote in message ...
> >On Mon, 26 Nov 2001 06:47:54 GMT, Anders Wirzenius wrote:
> >> Preben Randhol wrote in message ...
> >>
> >> I started to avoid the "use" a while ago and am nowadays merrily
> returning
> >> to code coded since that.
> >> I second your advice, but why do you include the word "beginner" in your
> >> advice?
> >> Doesn't it apply to all programmers?
> >
> >Yes, but as a beginner these things can be a bit confusing. If you are
> >experienced you should know what you have done wrong when the compiler
> >complains about this :-)
> >
>
> If I am a beginner and am advised to avoid "use" then when do I know that I
> am not a beginner any more? Apparently I just KNOW. :-))
One way to know is when you get _really_ _really_ tired of
Foo.Bar.func, and find yourself thinking "I have tools to tell me
where 'func' is, I don't need to do this anymore!". (note; only being
_really_ tired of it doesn't count :).
> Well, there was another reason for asking my question:
>
> I sometimes long for a systematic list of the origin of utilized functions
> and procedures. The compiler chooses, say, procedure Put from one of my,
> say, five withed packages. The compiler could easily produce a list of
> extended procedure names where it is shown from which package the Put is
> fetched. It could be accomplished with an additional switch (Gnat: -gnatxn,
> resulting in an extended ali file). The output should show the package name
> and the library or source file where the package exists.
>
> Or have I missed an already existing possibility?
One tool that does something similar to this is Emacs Ada mode, in
conjunction with GNAT cross reference output. Put the cursor on a
function call, hit ^C^D, and up pops the definition.
Most compilers have some sort of "cross reference" output; I'm only
familiar with GNAT.
It would be straight-forward to write an ASIS tool to do this, that
would be portable to any Ada compiler that supports ASIS.
>
>
> Anders
>
>
>
--
-- Stephe
next prev parent reply other threads:[~2001-11-27 14:06 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-21 4:35 Gtkada-Prob Lars Heppler
2001-11-21 9:37 ` Gtkada-Prob Adrian Knoth
2001-11-21 18:52 ` Gtkada-Prob Preben Randhol
2001-11-21 9:38 ` Gtkada-Prob Preben Randhol
2001-11-21 10:02 ` Gtkada-Prob Count Zero
2001-11-21 17:06 ` Understanding Booleans Jeffrey Carter
2001-11-21 17:19 ` Jean-Marc Bourguet
2001-11-21 17:29 ` Preben Randhol
2001-11-21 20:05 ` Stephen Leake
2001-11-21 21:33 ` Florian Weimer
2001-11-22 4:23 ` Robert Dewar
2001-11-22 10:39 ` Preben Randhol
2001-11-22 15:51 ` Rod Chapman
2001-11-23 3:51 ` Robert Dewar
2001-11-24 20:09 ` Richard Riehle
2001-11-25 9:08 ` Pascal Obry
2001-11-25 15:06 ` Florian Weimer
2001-11-27 9:46 ` AG
2001-11-25 21:44 ` Jeffrey Carter
2001-11-21 10:19 ` Gtkada-Prob Florian Weimer
2001-11-21 10:36 ` Gtkada-Prob Preben Randhol
2001-11-21 10:39 ` Gtkada-Prob Count Zero
2001-11-21 10:50 ` Gtkada-Prob Preben Randhol
2001-11-21 10:57 ` Gtkada-Prob Lars Heppler
2001-11-21 11:53 ` Gtkada-Prob Preben Randhol
2001-11-21 12:24 ` Gtkada-Prob Florian Weimer
2001-11-21 12:57 ` Gtkada-Prob Preben Randhol
2001-11-21 17:33 ` Gtkada-Prob Adrian Knoth
2001-11-22 10:32 ` Gtkada-Prob Preben Randhol
2001-11-22 16:36 ` Gtkada-Prob Adrian Knoth
2001-11-22 21:13 ` Gtkada-Prob Jeffrey Carter
2001-11-23 10:17 ` Gtkada-Prob Preben Randhol
2001-11-26 6:47 ` Use of use, was Gtkada-Prob Anders Wirzenius
2001-11-26 9:25 ` Preben Randhol
2001-11-27 6:28 ` Anders Wirzenius
2001-11-27 14:06 ` Stephen Leake [this message]
2001-11-23 17:26 ` Gtkada-Prob Arnaud Charlet
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox