comp.lang.ada
 help / color / mirror / Atom feed
From: Gautier <gautier.demontmollin@maths.unine.ch>
Subject: Re: How to make like Fortran "do i = 1,20,2"
Date: 2000/07/28
Date: 2000-07-28T00:00:00+00:00	[thread overview]
Message-ID: <39817A66.B09A74FB@maths.unine.ch> (raw)
In-Reply-To: 8lrhj3$il7$1@news.uit.no

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




  reply	other threads:[~2000-07-28  0:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-27  0:00 How to make like Fortran "do i = 1,20,2" Reinert Korsnes
2000-07-27  0:00 ` G. de Montmollin
2000-07-27  0:00 ` Lutz Donnerhacke
2000-07-27  0:00 ` des walker
2000-07-27  0:00   ` tmoran
2000-07-28  0:00     ` Reinert Korsnes
2000-07-28  0:00       ` Gautier [this message]
2000-07-29  0:00       ` tmoran
2000-07-27  0:00   ` Gary Scott
2000-07-27  0:00 ` Ken Garlington
2000-07-27  0:00 ` Larry Kilgallen
2000-07-27  0:00   ` Gary Scott
2000-07-27  0:00     ` Larry Kilgallen
2000-07-27  0:00     ` Pat Rogers
2000-07-27  0:00     ` mjsilva
2000-07-27  0:00     ` Matthew J Heaney
2000-07-28  0:00       ` Gary Scott
2000-07-28  0:00         ` mjsilva
2000-07-29  0:00         ` Ehud Lamm
2000-07-28  0:00           ` Richard Riehle
2000-07-29  0:00           ` Robert I. Eachus
     [not found]           ` <39833637.3B83BFAC@lmtas.lmco.com>
2000-07-29  0:00             ` Gary Scott
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox