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: Gautier Subject: Re: How to make like Fortran "do i = 1,20,2" Date: 2000/07/28 Message-ID: <39817A66.B09A74FB@maths.unine.ch>#1/1 X-Deja-AN: 651785342 Content-Transfer-Encoding: 7bit References: <398066A3.8134B965@gecm.com> <8lrhj3$il7$1@news.uit.no> Content-Type: text/plain; charset=us-ascii X-Trace: 28 Jul 2000 14:18:15 +0100, hilbert.unine.ch MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-07-28T00:00:00+00:00 List-Id: Reinert Korsnes: > OK, I've learned a lesson. I tried a "hack".... No excuses hereby expressed. > > But when one mixes languages one may have to visit each N'te element in > arrays. But this may not be really Ada.... > > 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 ? > (Though, those examples may be odd and based on "thinking Fortran"....). The cases of arrays that must be stepped by various step sizes appear almost never (or never at all) in my number-crunchings - even with a lot of tables, re-indexings, multi-equation finite elements and so on. It means that defining records for pairs, indexing with enumeration types for various options etc. becomes a "reflexe" of Ada programming. You enrich the meaning of source code, for you and the compiler's optimiser, and you avoid typical bad surprises where you add a third case and forget changing a step somewhere, or swap (in mind) from 2*N to N*2... ______________________________________________________ Gautier -- http://members.xoom.com/gdemont/gsoft.htm