! Collection of code snippets by Arne Vajhøj 
! (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
program arrayloops
    parameter (n=10000000)
    real(kind=8) x(4,n)
    integer(kind=4) i,j,t1,t2
    call system_clock(t1)
    do i=1,4
        x(i,1)=1
        do j=2,n
            x(i,j)=sqrt(x(i,j-1)+i)
        end do
    end do
    call system_clock(t2)
    write(*,*) (x(i,n),i=1,4)
    write(*,*) t2-t1
end
