From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Passing arrays to procedures
Date: Wed, 22 Dec 2004 16:09:44 +0100
Date: 2004-12-22T16:09:44+01:00 [thread overview]
Message-ID: <41C98E38.7000908@mailinator.com> (raw)
In-Reply-To: <cqc0kt$mcn$00$1@news.t-online.com>
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 must declare an array type and use it in the function declaration:
type Blah is array (Integer range <>) of Something;
procedure Procname (N : in Integer; v1 : in Blah) is...
of course you can declare the array type where it best fit your design.
next prev parent reply other threads:[~2004-12-22 15:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-22 14:34 Passing arrays to procedures xadian
2004-12-22 15:09 ` Alex R. Mosteo [this message]
2004-12-22 18:43 ` xadian
2004-12-22 19:34 ` tmoran
2004-12-22 21:03 ` Martin Krischik
2004-12-23 0:50 ` Jeffrey Carter
2004-12-22 16:20 ` Martin Krischik
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox