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,5d0ce0dbca0a2038,start X-Google-Attributes: gid103376,public From: vsnyder@math.jpl.nasa.gov (Van Snyder) Subject: Q: Primitive operation of a type Date: 1997/06/25 Message-ID: <5oq51h$t7u@netline.jpl.nasa.gov>#1/1 X-Deja-AN: 253984950 Sender: vsnyder@gyre.jpl.nasa.gov (Van Snyder) Organization: Jet Propulsion Laboratory Newsgroups: comp.lang.ada Date: 1997-06-25T00:00:00+00:00 List-Id: I've looked at Barnes's book, and Cohen's book, and I can't decide whether it's possible for a procedure to be a primitive operation of more than one type. All they say is that a primitive operation of a type is a procedure declared in the same package specification as the type, and having an argument or result of the type. The question of other arguments is not discussed. If it's not possible, please send me a reference to the relevant parts of the LRM (or Barnes's book or Cohen's book), so I can learn the precise rules that apply (and you might as well ignore the remainder of this posting). If it is possible, please explain how over-riding works in this case: Suppose T1 and T2 are tagged types, and T11 and T21 are extensions thereof. Suppose P12 is a procedure that has arguments of types T1 and T2, P112 has arguments of types T11 and T2, and P121 has arguments of types T1 and T21, and suppose that P12, P112 and P121 all have the same name, P -- so P112 and P121 over-ride P12, but for different arguments and possibly for different derivation classes. Which procedure is used when P is invoked with arguments of types T11 and T21? Please refer me to sections of the LRM (or Barnes's or Cohen's books) that explain the answer. Thanks in advance for your help. -- What fraction of Americans believe | Van Snyder Wrestling is real and NASA is fake? | vsnyder@math.jpl.nasa.gov