comp.lang.ada
 help / color / mirror / Atom feed
From: "Sim Con" <sicon@hotmail.com>
Subject: Some questions
Date: Thu, 10 Oct 2002 11:17:54 +0000 (UTC)
Date: 2002-10-10T11:17:54+00:00	[thread overview]
Message-ID: <6c4a2b60cbe5ecf058fadca48f6c6e80.110780@mygate.mailgate.org> (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



             reply	other threads:[~2002-10-10 11:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 11:17 Sim Con [this message]
2002-10-10 12:27 ` Some questions 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
replies disabled

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