create, use and destroy a 2d array
PROGRAM Example IMPLICIT NONE INTEGER :: rows, columns, errcheck INTEGER, ALLOCATABLE :: array(:,:) rows = 5 columns = 10 ALLOCATE (array(rows,columns), STAT=errcheck) ! STAT is optional and is used for error checking array(3, 3) = 999 WRITE(*,*) array(3, 3) DEALLOCATE (array, STAT=errcheck) END PROGRAM Example