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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71c743c03ed191fe,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-15 07:54:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed.cwix.com!nsnmpen1-lo.nuria.telefonica-data.net!nsnmpen2-lo.nuria.telefonica-data.net!not-for-mail From: "Nacho" Newsgroups: comp.lang.ada Subject: Beginer problem: variable array size Date: Sun, 15 Sep 2002 16:53:39 +0200 Organization: Telefonica Data Espagna Message-ID: NNTP-Posting-Host: 213-4-242-60.uc.nombres.ttd.es X-Trace: nsnmpen2-gest.nuria.telefonica-data.net 1032101637 13402 213.4.242.60 (15 Sep 2002 14:53:57 GMT) X-Complaints-To: usenet@nsnmpen2-gest.nuria.telefonica-data.net NNTP-Posting-Date: Sun, 15 Sep 2002 14:53:57 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:28982 Date: 2002-09-15T16:53:39+02:00 List-Id: Hi everyone! I am learning ada and i have to implement an array of unknown size until rutime. The array must be resizable at runtime. This is easy to achieve for me in other lenguajes like c++, but i am new to ada and i don't know hot to resolve the problem. The solution in c++ code could be: int variable=50; //let's make an array of 50 elements. int* p; //pointer to int, if the array is of integers. p=new int[variable]; //we reserve memory for 50 integers. .... //some code with the array here. delete [] p; //we free the allocated memory for the array. variable=80; //we change the size of the array. p=new int[variable]; //we have a new array with the new size. How can I do the same in ada? How can I use dinamics arrays of variable size in ada? I am sorry for my poor English. Thanks.