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




<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





.



Relevant Pages

  • man C
    ... This is the seedoc for C from my cLIeNUX distro. ... language that produces high-performance results. ... The C programming language was developed around 1973 to make UNIX ...
    (comp.unix.programmer)
  • Re: Learning *NIX programming?
    ... Currently running Debian GNU Linux. ... If you do see C at a shell prompt in cLIeNUX you get this... ... language that produces high-performance results. ... The C programming language was developed around 1973 to make UNIX ...
    (comp.unix.programmer)
  • Re: Current languages are a mess, what would you choose C#, Java or C++?
    ... > interoperability of Fortran and C is standardized in the recently ... F95 is certainly a language to be seriously considered when doing ... Verbosity in a programming language should NOT be considered a Bad Thing. ...
    (comp.programming)
  • DRACO Compiler, by Gray Sage, its Author
    ... Writing compilers is probably a pretty strange hobby, ... The first compiler I wrote, like many programmers who end up writing ... programming language intended for Artificial Intelligence work. ... I came up with a truly ugly programming language, ...
    (comp.os.cpm)
  • Re: F is evil (was: XML::LibXML UTF-8 toString() -vs- nodeValue())
    ... characters instead of a sequence of ASCII characters. ... language, no matter if the programming language makes it easy or not. ... Sometimes this is because they don't speak English too well, ...
    (comp.lang.perl.misc)