Generalized range

Alex Martelli aleax at mac.com
Fri Apr 27 09:53:48 EDT 2007


Beliavsky <beliavsky at aol.com> wrote:
   ...
> > I've taught "numerical computing" in university, and I would have had to
> > fail anybody who'd misunderstood floating-point computations badly
> > enough to try that "+=step" idea (including, sigh, the coders of several
> > Fortran compilers who were popular at that time).
> 
> You may be referring to the Fortran DO loop with a REAL loop variable,
> for example
> 
> do x=1.5,3.5,0.5
>    print*,x
> end do
> 
> This was part of standard Fortran 77, so one should blame the
> standards committee, not the compiler writers. Very few features of

I was thinking of "Fortran IV" aka Fortran '66, where as I recall per
the standard you were _supposed_ to only use integers in a DO, but
several compilers supplied real loop variables as an extension, and got
its implementation wrong.


Alex



More information about the Python-list mailing list