From: "rashmi" <rashmi.thoras@gmail.com>
Subject: GENERIC SPEC TYPE ERROR
Date: 16 Nov 2005 02:43:34 -0800
Date: 2005-11-16T02:43:34-08:00 [thread overview]
Message-ID: <1132137814.272620.71410@f14g2000cwb.googlegroups.com> (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 ?
next reply other threads:[~2005-11-16 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-16 10:43 rashmi [this message]
2005-11-16 11:23 ` GENERIC SPEC TYPE ERROR Georg Bauhaus
2005-11-16 11:33 ` Dmitry A. Kazakov
2005-11-18 11:58 ` rashmi
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox