comp.lang.ada
 help / color / mirror / Atom feed
* GENERIC SPEC TYPE ERROR
@ 2005-11-16 10:43 rashmi
  2005-11-16 11:23 ` Georg Bauhaus
  2005-11-16 11:33 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 4+ messages in thread
From: rashmi @ 2005-11-16 10:43 UTC (permalink / raw)


Hi

I have created a generic specification for doing a vector operation
called PROC_Kronecker as shown below.
------------------------------------------------------------------------------------------------------------------------------------
File: PROC_KRONECKER.ads
------------------------------------------------------------------------------------------------------------------------------------


generic
	type PV_Vtyp is Private ;
	type VC_Rnge is range <>;
	type VC_Type is array(VC_Rnge) of PV_Vtyp;
	with function "*"(PV_Left,PV_Rigt : in PV_Vtyp) return PV_Vtyp;
	procedure PROC_Kronecker(VC_Left , VC_Rigt   : in VC_Type;VC_Resl:out
VC_Type);

------------------------------------------------------------------------------------------------------------------------------------

The associated body PROC_KRONECKER.adb works correctly for the above
spec. But when I tried to change the VC_Rnge and VC_Type to the
following:

                type VC_Rnge is Positive;
	type VC_Type is array(1..VC_Rnge) of PV_Vtyp;

then GNAT did not compile saying "Expecting generic type definition
here" where I have declared "Positive". Can someone clarify precisely
why the above cannot be valid ?




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

end of thread, other threads:[~2005-11-18 11:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-16 10:43 GENERIC SPEC TYPE ERROR rashmi
2005-11-16 11:23 ` Georg Bauhaus
2005-11-16 11:33 ` Dmitry A. Kazakov
2005-11-18 11:58   ` rashmi

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