Re: make i:j equivalent to [(k,k=i,j)]?
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 00:10:53 +0000 (UTC)
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.
There is at least the confusion between vector subscripts and
array sections.
In R, array subscripting is elemental, such that an array of
subscripts can be used to select the appropriate elements from
an array.
Fortran allows for vector subscripts where a rank one array
is used to supply the appropriate number of subscripts.
It might be that other places it could be used unambiguously.
-- glen
.
- References:
- make i:j equivalent to [(k,k=i,j)]?
- From: beliavsky
- make i:j equivalent to [(k,k=i,j)]?
- Prev by Date: completely static runtime environment
- Next by Date: Re: completely static runtime environment
- Previous by thread: make i:j equivalent to [(k,k=i,j)]?
- Next by thread: Re: make i:j equivalent to [(k,k=i,j)]?
- Index(es):
Relevant Pages
|
|