From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4ae5e9a205d57072,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!f14g2000cwb.googlegroups.com!not-for-mail From: "rashmi" Newsgroups: comp.lang.ada Subject: GENERIC SPEC TYPE ERROR Date: 16 Nov 2005 02:43:34 -0800 Organization: http://groups.google.com Message-ID: <1132137814.272620.71410@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: 61.11.60.236 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1132137819 19813 127.0.0.1 (16 Nov 2005 10:43:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 16 Nov 2005 10:43:39 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=61.11.60.236; posting-account=3DKkFw0AAACqdEmipLjcQnXXVUyr7_Eb Xref: g2news1.google.com comp.lang.ada:6424 Date: 2005-11-16T02:43:34-08:00 List-Id: 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 ?