Thursday 18 June 2009

Fortran array initialization

This webpage here is very helpful for fortran arrays.

I'd forgotten that you can initialize vectors like this:
x = (/(i,i=0,maxx-1)/)
Instead of:
do i=1,maxx
x(i) = i-1
enddo

No comments: