You want to say that you want to write some of the elements of an array with a name other_array, but not all of them, and that it ishould take essentially arbitrary values in turn? In other words, you want to print not
do i = 1, size(other_array,1)
write(*,*) other_array(i)
end do
but something like
array = [1,3,4,2,3,7,8,8,12]
write(*,*) another_array(array)
which will record the items another_arrayspecified in array? This is called an array substring. I have not tested this, and now I'm leaving, so I won’t.
source
share