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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71c743c03ed191fe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-19 13:25:06 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: Brian.Gaffney@myrealbox.com (Brian Gaffney) Newsgroups: comp.lang.ada Subject: Re: Beginer problem: variable array size Date: 19 Sep 2002 13:25:05 -0700 Organization: http://groups.google.com/ Message-ID: <5e9b8c34.0209191225.64d65753@posting.google.com> References: NNTP-Posting-Host: 137.244.215.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1032467106 1823 127.0.0.1 (19 Sep 2002 20:25:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 Sep 2002 20:25:06 GMT Xref: archiver1.google.com comp.lang.ada:29197 Date: 2002-09-19T20:25:06+00:00 List-Id: "Nacho" wrote in message news:... > That does not resolve the problem. I need to change the size of the array > after it has been created. With your solution once array_called_p has been > created it will never change its size. > Larry just didn't post enough of the Ada code. Here is a complete program that shows how to do what you want: with Gnat.IO; procedure Var is Variable : Integer := 50; type Int_Array is array (Integer range <>) of Integer; begin for i in 1 .. 2 loop declare P : Int_Array(1..Variable) := (others => 0); begin for J in P'range loop Gnat.IO.Put(P(J)'img); end loop; Gnat.IO.New_Line; end; Variable := 80; end loop; end Var; Prints a row of 50 0's followed by a row of 80 0's.