> I want to thank all contributors to my first post on Lotto simulation for their valuable input. > As a conclusion I decided to use the containers.vectors package. Here is my solution. Please > feel free to comment on any aspect. Looks OK, in principle. Some of your identifiers may be too short to understand what is going on (e.g., tz, iz), and, when communicating Ada source code, you should lean to capitalize identifiers (Tz or TZ, but not tz), ect ... Also, it is a little surprising that you don't output your results. However, my main criticism would be that your usage of Vectors is overkill for the problem at hand. Here is a solution using a single array, instead of two containers. with Ada.Numerics.Discrete_Random, Ada.Text_IO; procedure Ziehung2 is subtype Index is Integer range 1 .. 49; Ball: array(Index) of Index; begin -- intialize Ball for I in Index loop Ball(I) := I; end loop; -- draw six numbers and print them for I in 0 .. 5 loop -- invariant: Ball(1 .. Index'Last-I) hold the balls not yet drawn -- Ball(Index'Last-I+1 .. Index'Last) hold the balls drawn so far declare subtype Z is Index range 1 .. Index'Last-I; package RND is new Ada.Numerics.Discrete_Random(Z); Gen: RND.Generator; Drawn, Tmp: Index; begin RND.Reset(Gen); Drawn := Rnd.Random(Gen); -- Drawn := random index Ada.Text_IO.Put(Index'Image(Ball(Drawn))); -- print Ball(Drawn) -- move Ball(Drawn) to the end of Ball(1 .. Index'Last-I) -- more precisely, swap Ball(Index'Last-I) and Ball(Drawn) Tmp := Ball(Index'Last-I); Ball(Index'Last-I) := Ball(Drawn); Ball(Drawn) := Tmp; end; end loop; end Ziehung2 ------ I love the taste of Cryptanalysis in the morning! ------ --Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universität Weimar, Germany--