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,1ff542cf207f32ca X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.238.198 with SMTP id vm6mr15152552pbc.3.1328649735696; Tue, 07 Feb 2012 13:22:15 -0800 (PST) Path: lh20ni271812pbb.0!nntp.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Help needed - Upper Bound of an array - Question. Date: Tue, 07 Feb 2012 16:22:15 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <9203a648-af0d-45a1-87ba-67373435b391@k10g2000yqk.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 X-Trace: pcls6.std.com 1328649735 23044 192.74.137.71 (7 Feb 2012 21:22:15 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 7 Feb 2012 21:22:15 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:gguzoqVx5tt+mV1ZTzxv61w2e10= Content-Type: text/plain; charset=us-ascii Date: 2012-02-07T16:22:15-05:00 List-Id: adacrypt writes: > This is my declaration. > > SUBTYPE Index_30 IS Integer RANGE -500000 .. 500000; Why 30? Why not a new type? > TYPE I_CoefficientsNumArray IS ARRAY(Index_30) OF Integer; > I_Num : I_CoefficientsNumArray; > -- counts the occurences of the j coefficients of the ciphertext. > > Question : can I use your 'big array' declaration procedure in Ada-95 > just as you have typed here ? that would be great - will it work just > by replacing the present declaration with this? do I type in as a > straight crib just like that, regards - adacrypt I suggest you figure out how to increase the stack size, so you don't have to use pointers. It's in the GNAT documentation. If that's impossible, and you want to use pointers, you can avoid the issue of adding ".all" all over the place: I_Num_Pointer : I_CoefficientsNumArray_Pointer := new ...; I_Num : I_CoefficientsNumArray renames I_Num_Pointer.all; - Bob