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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f8a66fb9d0293bf4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!feed.news.tiscali.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Passing arrays to procedures Date: Wed, 22 Dec 2004 17:20:53 +0100 Organization: None Message-ID: <1167048.Xn0TX2Lvi1@linux1.krischik.com> References: Reply-To: martin@krischik.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1103732747 03 8343 zBVZrdW6nv8VSlCR 041222 16:25:47 X-Complaints-To: usenet-abuse@t-online.de X-ID: GDq1a2ZGrex4H-FSA+pslXt4GgchCscZFbG421LgJEEEz4XyyASnwO User-Agent: KNode/0.8.0 Xref: g2news1.google.com comp.lang.ada:7166 Date: 2004-12-22T17:20:53+01:00 List-Id: xadian wrote: > Hi, > > I just wanted to pass an array to a procedure. > A procedure head like this: > > procedure procname (n : in Integer; v1 : in array;) is ... > > it causes the following error: > > anonymous array definition not allowed here. > Same for array(Integer range 1..2) of Integer. The procedure is an extra > file so there are no arraynames of the main procedure available for the > parameter part. > Anyone knows why this error occurs and how to fix it?! You can only use named subtypes as procedure parameters: Programming:Ada:Subtypes#named_subtype You might also want to read: Programming:Ada:Types:array Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com