program test
	integer :: fst
	integer :: snd
	integer, dimension(0:4, 0:5) :: m
	do i = 0, 4
		 do j = 0, 5
				m(i, j) = i + j
		 end do
	end do
	write(*, *) 'with newlines when first index changes:'
	do fst = 0, 4
		 do snd = 0, 5
				write(*,"(i3,$)") m(fst, snd)
		 end do
		 write (*,*) ''
	end do
	write(*, *) 'with newlines when second index changes:'
	do snd = 0, 5
		 do fst = 0, 4
				write(*,"(i3,$)") m(fst, snd)
		 end do
		 write (*,*) ''
	end do
	write(*, *) 'slice rows:'
	do i = 0, 4
		 write( * , "(i3,$)" ) m(i,:)
		 write (*,*) ''
	end do
	write(*, *) 'slice columns:'
	do i = 0, 5
		 write( * , "(i3,$)" ) m(:,i)
		 write (*,*) ''
	end do
	write(*, *) 'memory order:'
	write( * , "(i3,$)" ) m
	write (*,*) ''
end program test

! Local Variables: !
! tab-width: 4 !
! compile-command: "gfortran test.f90" !
! End: !
