Not sure whether this is in the standard or an extentions to it, but it works with all fortran compilers I have access to and it fails with gfortran $ cat > bug.f <<EOF program bug parameter (maxdim=5) dimension a(maxdim,maxdim) data ((a(j,k),k=1,j),j=1,maxdim) / + 1, 2, 3, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15 / character*20 fmt * write(fmt,'(''('',i2.2,''(1x,f5.2))'')') maxdim do j=1,maxdim print fmt, (a(j,k),k=1,maxdim) enddo end EOF $ gfortran -o bug bug.f In file bug.f:4 data ((a(j,k),k=1,j),j=1,maxdim) / 1 Error: Variable 'j' at (1) cannot appear in an initialization expression
*** This bug has been marked as a duplicate of 23232 ***