I have put together the example below to illustrate FTN95 behaviour that surprised me. Look at the commented statement that assigns values to the dest array. FTN95 accepted this without warning and implemented it as though the statement was:
dest(ii(1): jj(1): -1) = 6
gFORTRAN however, does not accept the original statement and, I think correctly, reports an error 'Array index must be scalar'.
So, is the FTN95 behaviour here a bug or a feature?
Here is the code:
integer, dimension(10) :: dest integer, dimension(2) :: ii integer, dimension(2) :: jj
dest = 0
ii(1) = 4 ii(2) = 9 jj(1) = 2 jj(2) = 7
dest(ii: jj: -1) = 6 ! What does this do?