Re: make i:j equivalent to [(k,k=i,j)]?



Paul van Delst wrote:
beliavsky@xxxxxxx wrote:
Would it break anything in Fortran to make an expression

i:j

equivalent to the array constructor

[(k,k=i,j)]

The R programming language, which has a matrix language similar to
Fortran, effectively does this. I know that "not breaking" is not by
itself sufficient reason to add "syntactic sugar" to the language.

How 'bout some new operators:

i.upto.j == (/(k,k=i,j)/)

You can already do this with user defined operators. You can even do

i .upto. j .by. 7

;)

*** Hendrickson

and

j.downto.i = (/(k,k=j,i,-1)/)

?? :oD

cheers,

paulv

p.s. Hi Bil! :o)


.