Permutations by yt

procedure gnat.io.a is
procedure z(a,b:string)is
begin
if a'last=2 then put_line(b&a(2));end if;for i in 2..a'last loop
z(a(1..i-1)&a(i+1..a'last),b&a(i)&" ");end loop;end;begin
z("x012345","");end;

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top