comp.lang.ada
 help / color / mirror / Atom feed
* Some questions
@ 2002-10-10 11:17 Sim Con
  2002-10-10 12:27 ` David C. Hoos
  2002-10-10 14:18 ` Matthew Heaney
  0 siblings, 2 replies; 6+ messages in thread
From: Sim Con @ 2002-10-10 11:17 UTC (permalink / raw)


Hello! i have some questions, here i go:

I have a generic stack and i want to print it but the element (the
generic part) could be integer or float so i think i can expand the
instantiated generic class with a child with only the right print
procedures, so i make this (for float, but the same for int):

stack_float.ads
---------

with Stacks;
pragma elaborate_all(stacks);
package stack_float is new Stacks(float);
------------------

compilation ok, so problems come here:

stack_float_print.ads
---------

package stack_float.print is
    procedure Stampa(P: in Pila_int.pila);
end stack_float.print;
------------------

the compilator says "child of an instance must be an instance or
renaming", so what's wrong? How can i build custom procedures for print
the generic elements in generic packages???

Thanxs in advance ^_^    


-- 
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG



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

end of thread, other threads:[~2002-10-10 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 11:17 Some questions Sim Con
2002-10-10 12:27 ` David C. Hoos
2002-10-10 13:34   ` Sim Con
2002-10-10 13:44     ` Colin Paul Gloster
2002-10-10 14:36     ` David C. Hoos
2002-10-10 14:18 ` Matthew Heaney

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