Write one way back when starting Ada 83 (1984). Based on Djkstra's algoritm in A Discipline of Programming. Is this what you want. (Sorry for the long delay -- I only get to read CLA once every few weeks when flying on a plane). It only does a next perumutation, but a "previous" permutation is pretty simple to devise. Use WP's to even prove it :-). Regards, Steve Deller > -----Original Message----- > From: comp.lang.ada-admin@ada.eu.org > [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Hyman Rosen > Sent: Tuesday, April 30, 2002 11:06 AM > To: comp.lang.ada@ada.eu.org > Subject: Re: Generation of permutations > > > Ted Dennison wrote: > > Reinert Korsnes wrote in message > > news:... > > > >>Are there any good (Ada95) packages for generation of permutations > >>(of elements in array) ? > > > > Sadly, that doesn't come up much...outside of homework assignments. > > ;-) Are you writing a bogosort? > > Whether or not it comes up much, in fact the algorithms > next_permutation and prev_permutation are part of the C++ > standard library. You can find them online in . It should not be too difficult for the OP to translate them to Ada. _______________________________________________ comp.lang.ada mailing list comp.lang.ada@ada.eu.org http://ada.eu.org/mailman/listinfo/comp.lang.ada