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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ad4585f2971e47c5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not Date: Sat, 19 Feb 2011 14:17:18 +0000 Organization: A noiseless patient Spider Message-ID: References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx01.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="4086"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/JqgCJVhJqw11DhV5d2aeaUhTh+Jxj+Kg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:Yv9oGznDMktktXsvvmM4R46aAWY= sha1:HcNd44KkPruVrP+M3Czs1/IO5Mg= Xref: g2news2.google.com comp.lang.ada:18420 Date: 2011-02-19T14:17:18+00:00 List-Id: Brian Drummond writes: > Another example : moving an array from local variable (the stack) to > the heap (after I increased its size and hit a stack size limit) meant > I had to refer to it through an access type, instead of > directly. Instead of "my_array(I,J,K)" I was faced with changing every > reference to "my_array_ptr.all(I,J,K)" ... Really? I think that "my_array_ptr(I,J,K)" would have worked .. procedure Arrays is subtype Array_Bound is Natural range 0 .. 100; type Array_Type is array (Array_Bound, Array_Bound, Array_Bound) of Integer; type Array_Pointer is access Array_Type; My_Array : constant Array_Pointer := new Array_Type; begin My_Array (1, 2, 3) := 42; end Arrays;