comp.lang.ada
 help / color / mirror / Atom feed
* Q: Primitive operation of a type
@ 1997-06-25  0:00 Van Snyder
  1997-07-01  0:00 ` Matthew Heaney
  1997-07-02  0:00 ` Martin C. Carlisle
  0 siblings, 2 replies; 7+ messages in thread
From: Van Snyder @ 1997-06-25  0:00 UTC (permalink / 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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-07-14  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-25  0:00 Q: Primitive operation of a type Van Snyder
1997-07-01  0:00 ` 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

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