Dear all,
I have a simple question. Given an array [1,2,3]
, I want to extract the subset which excludes one of the elements. I’m sure that there is a much nicer compact form than what I’m writing below. Any suggestions?
Thank you!
implicit none
integer :: idir, idir_n(2)
do idir=1,3
select case(idir)
case(1)
idir_n(:) = [2,3]
case(2)
idir_n(:) = [1,3]
case(3)
idir_n(:) = [1,2]
end select
end do
end