Re: make i:j equivalent to [(k,k=i,j)]?
- From: "David Frank" <dave_frank@xxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 04:22:59 -0500
<beliavsky@xxxxxxx> wrote in message
news:1162249227.962196.46340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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.
Using CVF it is equivalent
integer :: i=4, j = 7, arr(4)
arr = [i:j]
write (*,*) [i:j], arr ! 4 5 6 7 4 5 6 7
.
- References:
- make i:j equivalent to [(k,k=i,j)]?
- From: beliavsky
- make i:j equivalent to [(k,k=i,j)]?
- Prev by Date: Re: Why these original FORTRAN quirks?
- Next by Date: Re: Keywords: UPCASE, downcase or Capitalized?
- Previous by thread: Re: make i:j equivalent to [(k,k=i,j)]?
- Next by thread: completely static runtime environment
- Index(es):
Relevant Pages
|