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=-1.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,cd9275d04b04fb6e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-08 21:33:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc04.POSTED!not-for-mail From: "Steve" Newsgroups: comp.lang.ada References: Subject: Re: trying to work with generic X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: NNTP-Posting-Host: 12.211.13.75 X-Complaints-To: abuse@comcast.net X-Trace: sccrnsc04 1057725204 12.211.13.75 (Wed, 09 Jul 2003 04:33:24 GMT) NNTP-Posting-Date: Wed, 09 Jul 2003 04:33:24 GMT Organization: Comcast Online Date: Wed, 09 Jul 2003 04:33:24 GMT Xref: archiver1.google.com comp.lang.ada:40136 Date: 2003-07-09T04:33:24+00:00 List-Id: Move the line that reads: PACKAGE Array_Generic IS to the line immediately following TYPE indexType IS (<>); and you'll have it. The parameters of your generic (or whatever they're officially called) need to come between the generic keyword and your package declaration (or procedure or function definition for generic procedures and functions). Steve (The Duck) "Cephus�" wrote in message news:vgn4spk446g005@corp.supernews.com... > Hello guys, I am getting an error here trying to compile a specification for > an array_generic package I am making for class. Can you guys tell me why it > is not allowing me to use (<>) in the indextype declaration: > > WITH Ada.TEXT_IO; > > GENERIC > > > PACKAGE array_generic IS > > > --declare the private type > > TYPE elementType IS PRIVATE; > > > --declare the index type, the generic array > > TYPE indexType IS (<>); > > TYPE listType IS ARRAY(indexType RANGE <>) OF elementType; > > > PROCEDURE getData(list : OUT listType; infile : IN OUT > > Ada.TEXT_IO.File_Type); > > > PROCEDURE Display(list : IN listType); > > > FUNCTION Find(list : listType; item : elementType) RETURN Boolean; > > > end array_generic; > >