comp.lang.ada
 help / color / mirror / Atom feed
From: mjsilva@my-deja.com
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: <8lsg7k$q55$1@nnrp1.deja.com> (raw)
In-Reply-To: 3981A390.A1F3D127@lmtas.lmco.com

In article <3981A390.A1F3D127@lmtas.lmco.com>,
  Gary Scott <Gary.L.Scott@lmtas.lmco.com> wrote:
>
>
> Matthew J Heaney wrote:
> >
> > Gary Scott <Gary.L.Scott@lmtas.lmco.com> writes:
> >
> > > Hmmm, these and similar examples posted do not make Ada look very
> > > elegant...it makes a very simple concept seem somewhat convoluted.
> >
> > This "very simple concept" is a major source of bugs -- that's why
it's
> > not in the language.
>
> "Studies" of language usage and error inducing constructs can be made
to
> support virtually any preconceived notion.  I'm more interested in
> producing the code that solves a particular problem in the easiest to
> understand and straightforward form rather than in the most elegant in
> terms of abstraction.  Of course it is very common...

I don't think there's any concensus that this is the case.  Just for
grins I checked my current project (in C) and found 241 "for" loops.
Not a single one had a step size other than 1.  OTOH, each of those 241
loops would have a much more elegant form in Ada...

>...to use steps in
> languages with somewhat limited alternative constructs in certain
> circumstances when the problem might be solved in another way more
> clearly and/or elegantly.  Fortran 95 supports all of the alternative
> methods presented so far in addition to the single DO-STEP construct.

Out of curiosity does Fortran 95 have the equivalent of Ada's various
implicit loop bounds (I in X'range, I in X'first..X'last, I in X_type)?

Mike



Sent via Deja.com http://www.deja.com/
Before you buy.




  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 ` Larry Kilgallen
2000-07-27  0:00   ` Gary Scott
2000-07-27  0:00     ` Larry Kilgallen
2000-07-27  0:00     ` Matthew J Heaney
2000-07-28  0:00       ` Gary Scott
2000-07-28  0:00         ` mjsilva [this message]
2000-07-29  0:00         ` Ehud Lamm
2000-07-28  0:00           ` Richard Riehle
     [not found]           ` <39833637.3B83BFAC@lmtas.lmco.com>
2000-07-29  0:00             ` Gary Scott
2000-07-29  0:00           ` Robert I. Eachus
2000-07-27  0:00     ` mjsilva
2000-07-27  0:00     ` Pat Rogers
2000-07-27  0:00 ` Ken Garlington
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
2000-07-29  0:00       ` tmoran
2000-07-27  0:00   ` Gary Scott
2000-07-27  0:00 ` G. de Montmollin
2000-07-27  0:00 ` Lutz Donnerhacke
replies disabled

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