comp.lang.ada
 help / color / mirror / Atom feed
From: vsnyder@math.jpl.nasa.gov (Van Snyder)
Subject: Q: Primitive operation of a type
Date: 1997/06/25
Date: 1997-06-25T00:00:00+00:00	[thread overview]
Message-ID: <5oq51h$t7u@netline.jpl.nasa.gov> (raw)


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




             reply	other threads:[~1997-06-25  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-25  0:00 Van Snyder [this message]
1997-07-01  0:00 ` Q: Primitive operation of a type Matthew Heaney
1997-07-02  0:00   ` Mats Weber
1997-07-03  0:00     ` Matthew Heaney
1997-07-08  0:00       ` Mats Weber
1997-07-14  0:00         ` Matthew Heaney
1997-07-02  0:00 ` Martin C. Carlisle
replies disabled

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