Question: Adding outputs from a loop to an array

Could you please give an example of a code where I can add outputs from a loop to a list. I am using the break command to end the loop so I don't have the number of elements in advance.

Edit: I have also changed the title accordingly. There was more to this question, somehow which was omitted. I am writing it again. My code looks like below: 
if ...
do H[i]:=int(K);
...
... end do;
end if;

I want an array of H[i]'s. The loop breaks when a condition is met, so I can't create an array with a given dimension beforehand. Thank you.

Please Wait...