comp.lang.ada
 help / color / mirror / Atom feed
From: "James A. Squire" <m193884@CSEHP3.MDC.COM>
Subject: Re: Dispatching in Ada95
Date: 1996/04/23
Date: 1996-04-23T00:00:00+00:00	[thread overview]
Message-ID: <317CEDFF.7759@csehp3.mdc.com> (raw)
In-Reply-To: md5:5BDD03FA023B9E2881F3A55BFDD6938A

On, Tue, 23 Apr 1996 04:00:50 GMT, Tucker Taft
<stt@HENNING.CAMB.INMET.COM>

> No, not directly visible.  Direct visibility is required only if you want
> to write "F(X)"; just plain "visibility" is required if you are willing to
> write "P.F(X)."

Sorry, I was using peculiar semantics in which:  P.F(X) makes F(X)
directly visible.  In any event, I agree with your statement.

> : > Let's take an example. We create a package AAA which defines a class A
> : > as well as a Create function, and a Get_Info function.
>
> : [example snipped]
>
> : > Now, our main procedure T. T withes AAA, BBB and Text_IO, and uses all
> : > of them except BBB.
>
> : So, you do compromise and use the use clause, then.  That was my whole
> : question.  The use clause *is* essential to dispatching.
>
> No, the use clause is irrelevant to dispatching.  You can write P.F(X)
> in a dispatching call.  Furthermore, presuming X is of type T'Class,
> then only the "F" on "T" needs to be visible.  The "F" on T1, T2, etc.,
> need not be visible.

A couple of others have informed me of this also.  This is one fact in
all of this that I literally did not know.  I'm glad to hear that you
don't have use the use clause at all in order to use dispatching.  Of
course, I probably should have guessed as much as soon as someone
informed me that visibility to all dispatchable routines is not needed
at compile time - the other fact that I literally did not know.

> Dispatching has nothing to do with "use" clauses, and the only
> thing that has to be visible at compile-time (and not necessarily
> directly visible) is the primitive operation of the (root) type T, presuming
> the operand is of (compile-time) type T'Class.

This, it would seem, is important.  In other words, you can't just
specify any old primitive.  It has to be a primitive of the root type.

Thanks again for the help.  I think what many have interpreted as
confusion is actually my attempt to push people on this newsgroup to do
a better job of listening to my original questions.
--
James Squire
MDA Avionics Tools & Processes
ja_squire@csehp3.mdc.com
"one of these days I'm going to better myself by going to Knight school"
"You'll be a web knight instead of a web page!"




       reply	other threads:[~1996-04-23  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <md5:5BDD03FA023B9E2881F3A55BFDD6938A>
1996-04-23  0:00 ` James A. Squire [this message]
     [not found] <md5:F8080176D9F8A3EEEF6212652DAEEEE5>
1996-04-29  0:00 ` Dispatching in Ada95 James A. Squire
1996-04-29  0:00   ` Robert Dewar
     [not found] <md5:331AE542B80F60CE2470F379EDBF578B>
1996-04-22  0:00 ` James A. Squire
1996-04-23  0:00   ` Tucker Taft
1996-04-24  0:00   ` Robert Dewar
1996-04-24  0:00 ` Jon S Anthony
     [not found] <md5:85373D6BBD0F0A69C09034C3F08892BC>
1996-04-18  0:00 ` James A. Squire
1996-04-19  0:00   ` Robert A Duff
1996-04-19  0:00 ` Samuel Tardieu
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox