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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e511f3ccb3da24af X-Google-Attributes: gid103376,public From: tmoran@bix.com Subject: Re: How to make like Fortran "do i = 1,20,2" Date: 2000/07/29 Message-ID: #1/1 X-Deja-AN: 652068047 References: <8lrhj3$il7$1@news.uit.no> X-Complaints-To: abuse@pacbell.net X-Trace: news.pacbell.net 964848116 206.170.2.124 (Fri, 28 Jul 2000 22:21:56 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Fri, 28 Jul 2000 22:21:56 PDT Newsgroups: comp.lang.ada Date: 2000-07-29T00:00:00+00:00 List-Id: >When one tries to deal with representing geometry and solve >differential equations and following some mathematical >notation, one may want to visit subsets of elements in arrays ? Are the subsets inherent and fixed, two sequential items for an x,y pair for instance, or are they dynamic, arising from the nature of the algorithm? In the first case, as someone suggested, the "Ada way" would be to make an array of records, or of two-vectors, or simply a two dimensional array with rows of length two, and step through it from one row to the next, ie, by one. In the second case, if the algorithm calls for stepping by N at a time, then, as pointed out, that is indeed more easily expressed in Fortran than in Ada. It's surely an unusual situation, though.