Re: make i:j equivalent to [(k,k=i,j)]?
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Tue, 31 Oct 2006 16:43:39 GMT
Paul van Delst wrote:
beliavsky@xxxxxxx wrote:You can already do this with user defined operators. You can even doWould 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)/)
i .upto. j .by. 7
;)
*** Hendrickson
and.
j.downto.i = (/(k,k=j,i,-1)/)
?? :oD
cheers,
paulv
p.s. Hi Bil! :o)
- Follow-Ups:
- Re: make i:j equivalent to [(k,k=i,j)]?
- From: Paul van Delst
- Re: make i:j equivalent to [(k,k=i,j)]?
- References:
- Re: make i:j equivalent to [(k,k=i,j)]?
- From: Paul van Delst
- Re: make i:j equivalent to [(k,k=i,j)]?
- Prev by Date: Re: Unhandled exception in SWilk.exe (SWilk2.dll) (0 xC0000005) : Access violation error in Fortran dll.
- Next by Date: Re: make i:j equivalent to [(k,k=i,j)]?
- Previous by thread: Re: make i:j equivalent to [(k,k=i,j)]?
- Next by thread: Re: make i:j equivalent to [(k,k=i,j)]?
- Index(es):