Did you forget to assign with test%type3(i,1) = i
?
Since type3
is a 2D array, you need two indices to assign values. When you type test%type3 = i
you are assigning all elements at the same time with the same value. That is why in the end you get all 5.0
.
PS. Where is the ENDDO
statement?