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, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,931285576c2f2928 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-21 04:06:47 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!oleane.net!oleane!nnrp.oleane.net!skymaster!nobody From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: passing an array to a generic function Date: Fri, 21 Nov 2003 12:35:16 +0100 Organization: Adalog Message-ID: <78tkpb.r04.ln@skymaster> References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1069416110 17953 195.25.228.57 (21 Nov 2003 12:01:50 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 21 Nov 2003 12:01:50 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:2795 Date: 2003-11-21T12:35:16+01:00 List-Id: "Mr. J." a �crit dans le message news: fc116fae.0311210231.d4a9515@posting.google.com... > type Index is new Integer; > type Item is new Character; > type Arr is Array(1..23) of character; > > function Filter_String is new Filter_Array(Index,Item,Arr,"="); > > As U all experts guessed it won't compile, my question is how to pass > the array of character to my new function ? > In Ada, all types must match *exactly*. Therefore, you must define Arr as: type Arr is array (Index range 1..23) of Item; (1..23 has type Integer, not Index. And Item is a type different from Character). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr