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-Language: ENGLISH,ASCII X-Google-Thread: 103376,dcbd7ca060d79dba X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-05 14:01:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Code Search :-) Date: 05 Jun 2003 16:57:42 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: skates.gsfc.nasa.gov 1054846658 2989 128.183.235.92 (5 Jun 2003 20:57:38 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 5 Jun 2003 20:57:38 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:38738 Date: 2003-06-05T20:57:38+00:00 List-Id: DreySf@gmx.net (Drey) writes: > Hi ! > > I have a small problem... > or i think i�m too lazy or i ask my self why i schould code something, > that already has been coded :-) > > I search for a package that is able make methods on a type alike an > array. > What i want from this type "Field" that ist works like an array (the > dimensions of course are variable) but with one feature: I want to be > able to change the borders of dimensions (Increase,Decrease). > I hope i say it understandably. :-) No, but your example is clearer. Just shows that Ada is the true universal language :). > Example: > I have a Field that is limited > Var : Fieldtype( 1..3 , 1..6 , 1..8 ) of Elementtype > > and after the Icrease(Dimension => 1, Border => 1) operation on the > "Var" look like this: (It have the same Values of elementtype as > before) > Var : Fieldtype( _1..4_ , 1..6 , 1..8 ) of Elementtype I have a package that does this for one dimensional arrays (other Ada libraries have a similar package). See http://www.toadmail.com/~ada_wizard/ada/sal.html, in particular the SAL.Poly.Unbounded_Arrays package. (argh. I just realized all of the links to the formatted source code on that page are broken. I may get to fix them soon. You can download the .tar.gz). (one of my current projects is a web spider that checks that kind of thing. Yes, I started with Tom Moran's 'finder'). I don't explicitly provide the "Increase" function, but the "Append" function is similar. > I tried to make it with Lists (access types), and i will further try > to improve my code, but i hope that there is anybody who can help me > :-) I think there will be problems adapting my one-dimension package to multiple dimensions. You may have to use a one-dimensional array underneath, and do the multi-dimension index calculation yourself. -- -- Stephe