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,4d8b56262a702d36 X-Google-Attributes: gid103376,public From: "James A. Squire" Subject: Re: Dispatching in Ada95 Date: 1996/04/23 Message-ID: <317CEDFF.7759@csehp3.mdc.com>#1/1 X-Deja-AN: 150990022 sender: Ada programming language references: comments: Gated by NETNEWS@AUVM.AMERICAN.EDU content-type: text/plain; charset=us-ascii organization: MDA Avionics Tools & Processes mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.01 (X11; I; HP-UX A.09.01 9000/715) Date: 1996-04-23T00:00:00+00:00 List-Id: On, Tue, 23 Apr 1996 04:00:50 GMT, Tucker Taft > 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!"